1 |
if (live_call()) |
2 |
return global.live_result; |
3 |
switch (scene) |
4 |
{ |
5 |
case 0: |
6 |
cutscene_instance_create(64, 288, 959); |
7 |
obj_asgore_npc.npc_direction = "left"; |
8 |
break; |
9 |
case 1: |
10 |
if (obj_pl.y < 520) |
11 |
{ |
12 |
cutscene_instance_create(obj_pl.x, obj_pl.y, 1168); |
13 |
obj_player_npc.npc_direction = "up"; |
14 |
scr_cutscene_start(); |
15 |
} |
16 |
break; |
17 |
case 2: |
18 |
cutscene_npc_walk(1168, 160, 420, 3, "y", "up"); |
19 |
break; |
20 |
case 3: |
21 |
cutscene_wait(0.5); |
22 |
break; |
23 |
case 4: |
24 |
cutscene_camera_move(obj_pl.x, 330, 2); |
25 |
break; |
26 |
case 5: |
27 |
cutscene_wait(1); |
28 |
break; |
29 |
case 6: |
30 |
cutscene_dialogue(); |
31 |
with (msg) |
32 |
{ |
33 |
message[0] = "* . . ."; |
34 |
message[1] = "* The Underground is full# of beauty."; |
35 |
message[2] = "* Friends... Families..."; |
36 |
message[3] = "* Hopes... Dreams..."; |
37 |
message[4] = "* Or at least... it was."; |
38 |
prt[0] = 3090; |
39 |
prt[1] = 3090; |
40 |
prt[2] = 3090; |
41 |
prt[3] = 3597; |
42 |
prt[4] = 3557; |
43 |
talker[0] = 959; |
44 |
position = 0; |
45 |
} |
46 |
break; |
47 |
case 7: |
48 |
cutscene_wait(1); |
49 |
break; |
50 |
case 8: |
51 |
cutscene_npc_walk(959, 160, 288, 1, "x", "right"); |
52 |
break; |
53 |
case 9: |
54 |
cutscene_wait(0.25); |
55 |
break; |
56 |
case 10: |
57 |
cutscene_npc_direction(959, "down"); |
58 |
break; |
59 |
case 11: |
60 |
cutscene_wait(1); |
61 |
break; |
62 |
case 12: |
63 |
cutscene_dialogue(); |
64 |
with (msg) |
65 |
{ |
66 |
message[0] = "* . . ."; |
67 |
message[1] = "* Though valiantly they# fought..."; |
68 |
message[2] = "* Nobody could stop you,# could they?"; |
69 |
prt[0] = 3557; |
70 |
prt[1] = 3597; |
71 |
prt[2] = 3107; |
72 |
talker[0] = 959; |
73 |
position = 0; |
74 |
} |
75 |
break; |
76 |
case 13: |
77 |
cutscene_wait(1); |
78 |
break; |
79 |
case 14: |
80 |
cutscene_dialogue(); |
81 |
with (msg) |
82 |
{ |
83 |
message[0] = "* I had hoped this day# wouldn't come."; |
84 |
message[1] = "* Retaliation was# inevitable but..."; |
85 |
message[2] = "* I believed we could# handle it as we always# have."; |
86 |
prt[0] = 1923; |
87 |
prt[1] = 3107; |
88 |
prt[2] = 3090; |
89 |
talker[0] = 959; |
90 |
position = 0; |
91 |
} |
92 |
break; |
93 |
case 15: |
94 |
cutscene_npc_direction(959, "left"); |
95 |
break; |
96 |
case 16: |
97 |
cutscene_wait(1.5); |
98 |
break; |
99 |
case 17: |
100 |
cutscene_dialogue(); |
101 |
with (msg) |
102 |
{ |
103 |
message[0] = "* My dear friends... "; |
104 |
message[1] = "* I am sorry."; |
105 |
prt[0] = 3090; |
106 |
prt[1] = 3597; |
107 |
talker[0] = 959; |
108 |
position = 0; |
109 |
} |
110 |
break; |
111 |
case 18: |
112 |
cutscene_npc_direction(959, "down"); |
113 |
break; |
114 |
case 19: |
115 |
cutscene_dialogue(); |
116 |
with (msg) |
117 |
{ |
118 |
message[0] = "* I know why you are here# but... I'm afraid it's# too late."; |
119 |
message[1] = "* Your goal is out of# reach."; |
120 |
message[2] = "* Monsterkind's plight is# not something I take# pride in..."; |
121 |
message[3] = "* But it is a conflict# not of our making."; |
122 |
message[4] = "* ..."; |
123 |
message[5] = "* One thing is certain,# however."; |
124 |
message[6] = "* Your violence has# ensured this war never# to end."; |
125 |
message[7] = "* Many more, of both our# kinds, will perish# because of this day."; |
126 |
message[8] = "* Such is the path you# chose."; |
127 |
prt[0] = 3107; |
128 |
prt[1] = 3107; |
129 |
prt[2] = 3090; |
130 |
prt[3] = 3090; |
131 |
prt[4] = 3557; |
132 |
prt[5] = 3557; |
133 |
prt[6] = 3597; |
134 |
prt[7] = 3597; |
135 |
prt[8] = 3557; |
136 |
talker[0] = 959; |
137 |
position = 0; |
138 |
} |
139 |
break; |
140 |
case 20: |
141 |
cutscene_npc_direction(959, "left"); |
142 |
break; |
143 |
case 21: |
144 |
if (cutscene_wait(2)) |
145 |
scr_audio_fade_outscr_audio_fade_outfunction scr_audio_fade_out(arg0, arg1)
{
var snd = arg0;
var fade_len = arg1;
if (!audio_is_playing(snd))
return false;
audio_sound_gain(snd, 0, fade_len);
if (instance_exists(obj_audio_fade_helper))
{
with (obj_audio_fade_helper)
{
if (audio_to_fade == snd)
return false;
}
}
with (instance_create(0, 0, obj_audio_fade_helper))
audio_to_fade = snd;
} (obj_radio.current_song, 800); |
146 |
break; |
147 |
case 22: |
148 |
cutscene_dialogue(); |
149 |
with (msg) |
150 |
{ |
151 |
message[0] = "* But..."; |
152 |
message[1] = "* Even if you chose# differently..."; |
153 |
message[2] = "* The unfortunate truth# of the matter is..."; |
154 |
prt[0] = 3090; |
155 |
prt[1] = 3107; |
156 |
prt[2] = 3090; |
157 |
talker[0] = 959; |
158 |
position = 0; |
159 |
} |
160 |
break; |
161 |
case 23: |
162 |
cutscene_npc_direction(959, "down"); |
163 |
obj_asgore_npc.action_sprite = true; |
164 |
obj_asgore_npc.sprite_index = spr_asgore_ready; |
165 |
obj_asgore_npc.image_index = 0; |
166 |
obj_asgore_npc.image_speed = 0; |
167 |
break; |
168 |
case 24: |
169 |
cutscene_dialogue(); |
170 |
with (msg) |
171 |
{ |
172 |
message[0] = "* Your fate was sealed# the moment you entered# my kingdom."; |
173 |
prt[0] = 1703; |
174 |
talker[0] = 959; |
175 |
position = 0; |
176 |
} |
177 |
break; |
178 |
case 25: |
179 |
cutscene_wait(0.5); |
180 |
break; |
181 |
case 26: |
182 |
cutscene_npc_action_sprite(959, 3197, 1, true, 0, 658, 6); |
183 |
obj_asgore_npc.image_speed = 1; |
184 |
darken_target = 0.6; |
185 |
break; |
186 |
case 27: |
187 |
cutscene_dialogue(); |
188 |
with (msg) |
189 |
{ |
190 |
message[0] = "* We will rebuild."; |
191 |
message[1] = "* And with the help of# your SOUL, we will be# free."; |
192 |
message[2] = "* Goodbye."; |
193 |
prt[0] = 1703; |
194 |
prt[1] = 1703; |
195 |
prt[2] = 1703; |
196 |
talker[0] = 959; |
197 |
position = 0; |
198 |
} |
199 |
break; |
200 |
case 28: |
201 |
cutscene_camera_move(obj_pl.x, 360, 1); |
202 |
break; |
203 |
case 29: |
204 |
if (obj_asgore_npc.sprite_index != spr_asgore_throw) |
205 |
cutscene_npc_action_sprite(959, 3615, 1, true, 0); |
206 |
if (obj_asgore_npc.image_index >= 12 && !instance_exists(obj_asgore_trident)) |
207 |
{ |
208 |
instance_create_depth(obj_asgore_npc.x + 20, obj_asgore_npc.y - 4, -100, obj_asgore_trident); |
209 |
audio_play_sound(snd_undertale_swoosh, 1, 0); |
210 |
obj_asgore_trident.vspeed = 6; |
211 |
} |
212 |
if (obj_player_npc.sprite_index != spr_clover_geno_summon) |
213 |
cutscene_npc_action_sprite(1168, 190, 1, true, 0); |
214 |
if (obj_player_npc.image_index >= 7) |
215 |
obj_player_npc.image_speed = 0; |
216 |
if (instance_exists(obj_asgore_trident) && obj_asgore_trident.bbox_bottom >= (obj_player_npc.bbox_top - 12)) |
217 |
{ |
218 |
if (obj_asgore_trident.draw_overlay == false) |
219 |
{ |
220 |
audio_play_sound(snd_hurt, 1, 0); |
221 |
obj_asgore_trident.draw_overlay = true; |
222 |
obj_asgore_trident.vspeed = 0; |
223 |
} |
224 |
if (cutscene_wait(1)) |
225 |
{ |
226 |
var break_sound = audio_play_sound(snd_mirrorbreak1, 1, 0); |
227 |
audio_sound_pitch(break_sound, 0.8); |
228 |
audio_play_sound(snd_soul_gameover_hit_break, 1, 0); |
229 |
instance_destroy(obj_asgore_trident); |
230 |
var i = 200; |
231 |
while (i <= 340) |
232 |
{ |
233 |
if (round(i) != 270) |
234 |
{ |
235 |
var shard = instance_create_depth(obj_player_npc.x + 14, obj_player_npc.y - 5, obj_player_npc.depth - 1, obj_asgore_trident_shard); |
236 |
shard.direction = i; |
237 |
shard.speed = 3; |
238 |
} |
239 |
i += 15.555555555555555; |
240 |
} |
241 |
} |
242 |
} |
243 |
break; |
244 |
case 30: |
245 |
obj_asgore_npc.sprite_index = spr_asgore_surprised; |
246 |
obj_asgore_npc.image_index = 0; |
247 |
cutscene_wait(3.5); |
248 |
break; |
249 |
case 31: |
250 |
cutscene_dialogue(); |
251 |
with (msg) |
252 |
{ |
253 |
message[0] = "* !"; |
254 |
prt[0] = 64; |
255 |
talker[0] = 959; |
256 |
position = 0; |
257 |
skippable = false; |
258 |
} |
259 |
cutscene_advance(); |
260 |
break; |
261 |
case 32: |
262 |
darken_target = 0.35; |
263 |
if (cutscene_wait(1)) |
264 |
instance_destroy(obj_dialogue); |
265 |
break; |
266 |
case 33: |
267 |
obj_player_npc.image_speed = 1; |
268 |
cutscene_npc_action_sprite(1168, 190, 1, true, 0); |
269 |
charge_time = 110; |
270 |
charge_time_max = 110; |
271 |
is_charged = false; |
272 |
charge_percentage = 1; |
273 |
break; |
274 |
case 34: |
275 |
charge_percentage = charge_time / charge_time_max; |
276 |
if (!audio_is_playing(snd_chargeshot_charge)) |
277 |
{ |
278 |
charge_sound = audio_play_sound(snd_chargeshot_charge, 1, 1); |
279 |
audio_sound_gain(charge_sound, 0.8, 0); |
280 |
audio_sound_pitch(charge_sound, 0.5); |
281 |
} |
282 |
else |
283 |
{ |
284 |
var pitch_original = audio_sound_get_pitch(charge_sound); |
285 |
if (pitch_original < 0.99) |
286 |
audio_sound_pitch(charge_sound, 1 - (0.5 * charge_percentage)); |
287 |
else |
288 |
audio_sound_pitch(charge_sound, 1); |
289 |
} |
290 |
if (charge_time > 0) |
291 |
{ |
292 |
charge_time -= 1; |
293 |
} |
294 |
else if (!is_charged) |
295 |
{ |
296 |
darken_target = 0.75; |
297 |
scr_screenshakescr_screenshakefunction scr_screenshake(arg0, arg1)
{
if (instance_exists(obj_screenshake_player))
exit;
with (instance_create(__view_get(e__VW.Object, 0).x, __view_get(e__VW.Object, 0).y, obj_screenshake_player))
{alarm[0]
intensity = arg1;
}
}
enum e__VW
{
XView,
YView,
WView,
HView,
Angle,
HBorder,
VBorder,
HSpeed,
VSpeed,
Object,
Visible,
XPort,
YPort,
WPort,
HPort,
Camera,
SurfaceID
} (6, 3); |
298 |
is_charged = true; |
299 |
var ready_sound = audio_play_sound(snd_undertale_flash, 1, 0); |
300 |
audio_sound_gain(ready_sound, 0.5, 0); |
301 |
instance_create_depth(0, 0, -9999, obj_clover_flash); |
302 |
cutscene_advance(); |
303 |
} |
304 |
break; |
305 |
case 35: |
306 |
cutscene_wait(3); |
307 |
break; |
308 |
case 36: |
309 |
audio_stop_sound(charge_sound); |
310 |
instance_create_depth(obj_pl.x, obj_pl.y - 30, -9999, obj_castle_beam); |
311 |
obj_asgore_npc.sprite_index = spr_asgore_death; |
312 |
obj_asgore_npc.image_speed = 0; |
313 |
obj_asgore_npc.xstart = obj_asgore_npc.x; |
314 |
obj_asgore_npc.ystart = obj_asgore_npc.y; |
315 |
cutscene_advance(); |
316 |
break; |
317 |
case 37: |
318 |
if (!instance_exists(obj_castle_beam)) |
319 |
cutscene_wait(1.5); |
320 |
break; |
321 |
case 38: |
322 |
cutscene_npc_action_sprite(1168, 75, 1, false); |
323 |
break; |
324 |
case 39: |
325 |
if (cutscene_wait(2)) |
326 |
{ |
327 |
} |
328 |
break; |
329 |
case 40: |
330 |
cutscene_camera_move(obj_player_npc.x, obj_asgore_soul.y, 1, false); |
331 |
break; |
332 |
case 41: |
333 |
cutscene_npc_walk(1168, obj_player_npc.x, obj_asgore_soul.y + 40, 1, "y", "up"); |
334 |
break; |
335 |
case 42: |
336 |
cutscene_wait(1.5); |
337 |
break; |
338 |
case 43: |
339 |
obj_asgore_soul.scene += 1; |
340 |
cutscene_advance(); |
341 |
break; |
342 |
case 44: |
343 |
if (!instance_exists(obj_asgore_soul)) |
344 |
cutscene_advance(); |
345 |
break; |
346 |
case 45: |
347 |
if (!instance_exists(obj_asgore_soul)) |
348 |
cutscene_wait(1.5); |
349 |
break; |
350 |
case 46: |
351 |
if (obj_pl.y < 300) |
352 |
cutscene_camera_move(1168, 120, 1, true); |
353 |
cutscene_npc_walk(1168, 160, 120, 1, "x", "up"); |
354 |
break; |
355 |
case 47: |
356 |
cutscene_wait(1); |
357 |
break; |
358 |
case 48: |
359 |
if (instance_exists(obj_player_npc)) |
360 |
instance_destroy(obj_player_npc); |
361 |
if (cutscene_change_room(269, 160, 210, 0.03)) |
362 |
obj_pl.image_alpha = 1; |
363 |
break; |
364 |
} |
365 |
if (abs(darken_target - darken_current) > 0.01) |
366 |
darken_current = lerp(darken_current, darken_target, 0.15); |
367 |
else |
368 |
darken_current = darken_target; |