| 1 |
function scr_cutscene_battle_macro_2scr_cutscene_battle_macro_2function scr_cutscene_battle_macro_2()
{
if (live_call())
return global.live_result;
var soul = 2980;
switch (scene)
{
case -1:
if (! scr_battle_box_resize_midfight(575, 140))
exit;
if (draw_alpha > 0)
{
draw_alpha -= 0.05;
}
else
{
draw_alpha = 0;
scene++;
}
break;
case 0:
cutscene_wait(1);
break;
case 1:
obj_macro_frog_counter.screenshake_enabled = 1;
cutscene_wait(1);
break;
case 2:
obj_macro_frog_counter.screenshake_enabled = 2;
obj_macro_frog_counter.frog_count = 1;
obj_macro_frog_counter.frog_scale = 2;
obj_macro_frog_counter.frog_overlay_alpha = 1;
audio_play_sound(snd_danza_green_note, 1, 0);
obj_macro_froggit_body.sprite_index = spr_macro_froggit_scared_2;
obj_macro_froggit_body.image_speed = 0;
obj_macro_froggit_body.image_index = 0;
var buffrog = instance_create_depth(320, 180, obj_macro_froggit_body.depth + 1, obj_buff_froggit_body);
obj_background_macro_froggit.fade_out = true;
cutscene_advance();
break;
case 3:
draw_enabled = true;
skippable = false;
cutscene_wait(3);
break;
case 4:
message_adv = true;
cutscene_advance();
break;
case 5:
if (obj_macro_froggit_body.x > (obj_macro_froggit_body.xstart - 230))
{
obj_macro_froggit_body.hspeed -= 0.1;
obj_macro_froggit_body.vspeed += 0.01;
}
else
{
obj_macro_froggit_body.hspeed = 0;
obj_macro_froggit_body.vspeed = 0;
}
obj_quote_bubble_battle.hspeed = obj_macro_froggit_body.hspeed;
obj_macro_froggit_body.vspeed = obj_macro_froggit_body.vspeed;
cutscene_wait(3);
break;
case 6:
instance_create_depth(0, 0, obj_macro_froggit_body.depth + 10, obj_macro_froggit_particle);
burst_count = 3;
draw_enabled = false;
cutscene_advance();
break;
case 7:
case 9:
case 11:
obj_macro_froggit_particle.particle_burst = true;
if (scene == 11)
burst_count--;
cutscene_advance();
break;
case 8:
case 10:
cutscene_wait(0.25);
break;
case 12:
if (burst_count > 0)
{
if (cutscene_wait(2.5))
cutscene_advance(7);
}
else
{
cutscene_advance();
}
break;
case 13:
cutscene_wait(2.2);
break;
case 14:
cutscene_dialogue_giga(90, 10);
with (msg)
{
position = 0;
... () |
| 2 |
{ |
| 3 |
if (live_call()) |
| 4 |
return global.live_result; |
| 5 |
var soul = 2980; |
| 6 |
switch (scene) |
| 7 |
{ |
| 8 |
case -1: |
| 9 |
if (!scr_battle_box_resize_midfightscr_battle_box_resize_midfightfunction scr_battle_box_resize_midfight()
{
if (instance_exists(obj_dialogue_box_battle_transformation_any))
{
with (obj_dialogue_box_battle_transformation_any)
{
battle_box_resize_midfight = true;
battle_box_target_xscale = argument[0] / sprite_get_width(sprite_index);
battle_box_target_yscale = argument[1] / sprite_get_height(sprite_index);
if (argument_count > 2)
{
battle_box_target_x = argument[2];
battle_box_target_y = argument[3];
}
if (abs(image_xscale - battle_box_target_xscale) < 0.01 && abs(image_yscale - battle_box_target_yscale) < 0.01 && abs(x - battle_box_target_x) < 0.1 && abs(y - battle_box_target_y) < 0.1)
{
var box = 3154;
global.attack_surface_width = box.sprite_width - 8;
global.attack_surface_height = box.sprite_height - 8;
global.attack_surface_x = box.x - (global.attack_surface_width * 0.5);
global.attack_surface_y = box.y - (global.attack_surface_height * 0.5);
if (surface_exists(global.attack_surface))
global.attack_surface = surface_create(global.attack_surface_width, global.attack_surface_height);
return true;
}
}
}
else
{
return false;
}
} (575, 140)) |
| 10 |
exit; |
| 11 |
if (draw_alpha > 0) |
| 12 |
{ |
| 13 |
draw_alpha -= 0.05; |
| 14 |
} |
| 15 |
else |
| 16 |
{ |
| 17 |
draw_alpha = 0; |
| 18 |
scene++; |
| 19 |
} |
| 20 |
break; |
| 21 |
case 0: |
| 22 |
cutscene_wait(1); |
| 23 |
break; |
| 24 |
case 1: |
| 25 |
obj_macro_frog_counter.screenshake_enabled = 1; |
| 26 |
cutscene_wait(1); |
| 27 |
break; |
| 28 |
case 2: |
| 29 |
obj_macro_frog_counter.screenshake_enabled = 2; |
| 30 |
obj_macro_frog_counter.frog_count = 1; |
| 31 |
obj_macro_frog_counter.frog_scale = 2; |
| 32 |
obj_macro_frog_counter.frog_overlay_alpha = 1; |
| 33 |
audio_play_sound(snd_danza_green_note, 1, 0); |
| 34 |
obj_macro_froggit_body.sprite_index = spr_macro_froggit_scared_2; |
| 35 |
obj_macro_froggit_body.image_speed = 0; |
| 36 |
obj_macro_froggit_body.image_index = 0; |
| 37 |
var buffrog = instance_create_depth(320, 180, obj_macro_froggit_body.depth + 1, obj_buff_froggit_body); |
| 38 |
obj_background_macro_froggit.fade_out = true; |
| 39 |
cutscene_advance(); |
| 40 |
break; |
| 41 |
case 3: |
| 42 |
draw_enabled = true; |
| 43 |
skippable = false; |
| 44 |
cutscene_wait(3); |
| 45 |
break; |
| 46 |
case 4: |
| 47 |
message_adv = true; |
| 48 |
cutscene_advance(); |
| 49 |
break; |
| 50 |
case 5: |
| 51 |
if (obj_macro_froggit_body.x > (obj_macro_froggit_body.xstart - 230)) |
| 52 |
{ |
| 53 |
obj_macro_froggit_body.hspeed -= 0.1; |
| 54 |
obj_macro_froggit_body.vspeed += 0.01; |
| 55 |
} |
| 56 |
else |
| 57 |
{ |
| 58 |
obj_macro_froggit_body.hspeed = 0; |
| 59 |
obj_macro_froggit_body.vspeed = 0; |
| 60 |
} |
| 61 |
obj_quote_bubble_battle.hspeed = obj_macro_froggit_body.hspeed; |
| 62 |
obj_macro_froggit_body.vspeed = obj_macro_froggit_body.vspeed; |
| 63 |
cutscene_wait(3); |
| 64 |
break; |
| 65 |
case 6: |
| 66 |
instance_create_depth(0, 0, obj_macro_froggit_body.depth + 10, obj_macro_froggit_particle); |
| 67 |
burst_count = 3; |
| 68 |
draw_enabled = false; |
| 69 |
cutscene_advance(); |
| 70 |
break; |
| 71 |
case 7: |
| 72 |
case 9: |
| 73 |
case 11: |
| 74 |
obj_macro_froggit_particle.particle_burst = true; |
| 75 |
if (scene == 11) |
| 76 |
burst_count--; |
| 77 |
cutscene_advance(); |
| 78 |
break; |
| 79 |
case 8: |
| 80 |
case 10: |
| 81 |
cutscene_wait(0.25); |
| 82 |
break; |
| 83 |
case 12: |
| 84 |
if (burst_count > 0) |
| 85 |
{ |
| 86 |
if (cutscene_wait(2.5)) |
| 87 |
cutscene_advance(7); |
| 88 |
} |
| 89 |
else |
| 90 |
{ |
| 91 |
cutscene_advance(); |
| 92 |
} |
| 93 |
break; |
| 94 |
case 13: |
| 95 |
cutscene_wait(2.2); |
| 96 |
break; |
| 97 |
case 14: |
| 98 |
cutscene_dialogue_giga(90, 10); |
| 99 |
with (msg) |
| 100 |
{ |
| 101 |
position = 0; |
| 102 |
message[0] = "M E G A C R O A K"; |
| 103 |
skippable = false; |
| 104 |
} |
| 105 |
if (cutscene_wait(6)) |
| 106 |
{ |
| 107 |
msg.message_adv = true; |
| 108 |
global.dialogue_open = false; |
| 109 |
cutscene_advance(15); |
| 110 |
} |
| 111 |
break; |
| 112 |
case 15: |
| 113 |
obj_buff_froggit_body.draw_silhouette_alpha -= 0.005; |
| 114 |
if (obj_buff_froggit_body.draw_silhouette_alpha <= 0.8) |
| 115 |
{ |
| 116 |
obj_macro_froggit_body.sprite_index = spr_macro_froggit_scared; |
| 117 |
obj_macro_froggit_body.image_alpha = 1; |
| 118 |
cutscene_advance(); |
| 119 |
} |
| 120 |
break; |
| 121 |
case 16: |
| 122 |
obj_buff_froggit_body.draw_silhouette_alpha -= 0.05; |
| 123 |
obj_buff_froggit_body.image_xscale += 0.1; |
| 124 |
obj_buff_froggit_body.image_yscale = obj_buff_froggit_body.image_xscale; |
| 125 |
if (obj_buff_froggit_body.draw_silhouette_alpha <= 0) |
| 126 |
{ |
| 127 |
audio_play_sound(snd_undertale_explosion, 1, 0); |
| 128 |
audio_play_sound(snd_undertale_explosion, 1, 0); |
| 129 |
scr_screenshake_battlescr_screenshake_battlefunction scr_screenshake_battle()
{
instance_destroy(obj_screenshake_battle);
var screenshake = instance_create(0, 0, obj_screenshake_battle);
battle_screenshake_duration = argument[0];
battle_screenshake_intensity = argument[1];
battle_screenshake_dec = battle_screenshake_intensity / battle_screenshake_duration;
} (6, 2); |
| 130 |
instance_create_depth(obj_dialogue_box_battle_transformation_any.x, obj_dialogue_box_battle_transformation_any.y, obj_dialogue_box_battle_transformation_any.depth, obj_buff_froggit_battle_box_destroy); |
| 131 |
obj_dialogue_box_battle_transformation_any.battle_box_draw_enabled = 0; |
| 132 |
global.image_alpha_enemy_attacking_immunity = false; |
| 133 |
cutscene_advance(); |
| 134 |
obj_buff_froggit_body.draw_silhouette_alpha = 0; |
| 135 |
} |
| 136 |
break; |
| 137 |
case 17: |
| 138 |
obj_buff_froggit_body.image_xscale = lerp(obj_buff_froggit_body.image_xscale, 2, 0.2); |
| 139 |
if (obj_buff_froggit_body.image_xscale <= 2.05) |
| 140 |
{ |
| 141 |
obj_buff_froggit_body.image_xscale = 2; |
| 142 |
cutscene_advance(); |
| 143 |
} |
| 144 |
obj_buff_froggit_body.image_yscale = obj_buff_froggit_body.image_xscale; |
| 145 |
break; |
| 146 |
case 18: |
| 147 |
if (cutscene_wait(3)) |
| 148 |
{ |
| 149 |
with (obj_quote_bubble_battle) |
| 150 |
{ |
| 151 |
x = xstart; |
| 152 |
y = ystart; |
| 153 |
} |
| 154 |
message_adv = true; |
| 155 |
} |
| 156 |
break; |
| 157 |
case 19: |
| 158 |
draw_enabled = true; |
| 159 |
cutscene_advance(); |
| 160 |
break; |
| 161 |
case 20: |
| 162 |
case 21: |
| 163 |
case 22: |
| 164 |
if (cutscene_wait(3)) |
| 165 |
message_adv = true; |
| 166 |
break; |
| 167 |
case 23: |
| 168 |
draw_enabled = false; |
| 169 |
cutscene_wait(0.5); |
| 170 |
break; |
| 171 |
case 24: |
| 172 |
obj_buff_froggit_body.image_speed = 1; |
| 173 |
obj_macro_froggit_body.sprite_index = spr_macro_froggit_scared_2; |
| 174 |
obj_macro_froggit_body.image_speed = 0; |
| 175 |
obj_macro_froggit_body.image_index = 1; |
| 176 |
if (obj_buff_froggit_body.image_index >= 21 && !instance_exists(obj_final_green_frog)) |
| 177 |
{ |
| 178 |
audio_play_sound(snd_undertale_flash, 1, 0); |
| 179 |
instance_create_depth(obj_buff_froggit_body.x - 42, obj_buff_froggit_body.y + 70, -200, obj_final_green_frog); |
| 180 |
} |
| 181 |
if (obj_buff_froggit_body.image_index >= (obj_buff_froggit_body.image_number - 1)) |
| 182 |
{ |
| 183 |
obj_buff_froggit_body.image_speed = 0; |
| 184 |
obj_buff_froggit_body.image_index = obj_buff_froggit_body.image_number - 1; |
| 185 |
cutscene_advance(); |
| 186 |
} |
| 187 |
break; |
| 188 |
case 25: |
| 189 |
cutscene_wait(1); |
| 190 |
break; |
| 191 |
case 26: |
| 192 |
draw_enabled = true; |
| 193 |
cutscene_wait(2.5); |
| 194 |
break; |
| 195 |
case 27: |
| 196 |
with (soul) |
| 197 |
{ |
| 198 |
xstart = x; |
| 199 |
ystart = y; |
| 200 |
} |
| 201 |
shake_strength = 0; |
| 202 |
draw_enabled = false; |
| 203 |
cutscene_advance(); |
| 204 |
break; |
| 205 |
case 28: |
| 206 |
shake_strength += 0.007; |
| 207 |
if (shake_strength >= 1) |
| 208 |
{ |
| 209 |
if (instance_exists(obj_final_green_frog)) |
| 210 |
{ |
| 211 |
soul.direction = point_direction(soul.x, soul.y, obj_final_green_frog.x, obj_final_green_frog.y); |
| 212 |
if (soul.speed < 1) |
| 213 |
soul.speed += 0.05; |
| 214 |
} |
| 215 |
} |
| 216 |
else |
| 217 |
{ |
| 218 |
with (soul) |
| 219 |
{ |
| 220 |
x = xstart + random_range(-other.shake_strength, other.shake_strength); |
| 221 |
y = ystart + random_range(-other.shake_strength, other.shake_strength); |
| 222 |
} |
| 223 |
} |
| 224 |
if (!instance_exists(obj_final_green_frog)) |
| 225 |
{ |
| 226 |
soul.speed = 0; |
| 227 |
cutscene_advance(); |
| 228 |
scr_screenshake_battle_customscr_screenshake_battle_customfunction scr_screenshake_battle_custom()
{
instance_destroy(obj_screenshake_battle);
var screenshake = instance_create(0, 0, obj_screenshake_battle);
screenshake.battle_screenshake_duration = argument[0];
screenshake.battle_screenshake_intensity = argument[1];
screenshake.battle_screenshake_dec = screenshake.battle_screenshake_intensity / screenshake.battle_screenshake_duration;
} (9999, 2); |
| 229 |
audio_play_sound(mus_cymbal, 1, 0); |
| 230 |
} |
| 231 |
break; |
| 232 |
case 29: |
| 233 |
draw_alpha += 0.0075; |
| 234 |
if (draw_alpha >= 1) |
| 235 |
cutscene_wait(1); |
| 236 |
break; |
| 237 |
case 30: |
| 238 |
room = rm_steamworks_18; |
| 239 |
global.cutscene = true; |
| 240 |
obj_pl.x = 448; |
| 241 |
obj_pl.y = 180; |
| 242 |
obj_pl.image_alpha = 1; |
| 243 |
global.sworks_flag[46] = 2; |
| 244 |
break; |
| 245 |
} |
| 246 |
if (scene >= 16 && scene < 23) |
| 247 |
{ |
| 248 |
with (obj_macro_froggit_body) |
| 249 |
{ |
| 250 |
x = lerp(x, 100, 0.2) + irandom_range(-2, 2); |
| 251 |
y = lerp(y, 220, 0.2) + irandom_range(-2, 2); |
| 252 |
} |
| 253 |
} |
| 254 |
if (scene >= 17 && scene < 27) |
| 255 |
{ |
| 256 |
obj_heart_battle_fighting_parent.moveable = false; |
| 257 |
obj_heart_battle_fighting_parent.x = lerp(obj_heart_battle_fighting_parent.x, 320, 0.15); |
| 258 |
obj_heart_battle_fighting_parent.y = lerp(obj_heart_battle_fighting_parent.y, obj_dialogue_box_battle_transformation_any.bbox_bottom - 8, 0.15); |
| 259 |
} |
| 260 |
if (scene >= 17) |
| 261 |
{ |
| 262 |
if (global.image_alpha_enemy_attacking > -10) |
| 263 |
global.image_alpha_enemy_attacking -= 0.5; |
| 264 |
obj_buff_froggit_body.y = lerp(obj_buff_froggit_body.y, 170, 0.25); |
| 265 |
} |
| 266 |
} |