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