Undertale Yellow script viewer

← back to main script listing

gml_Object_obj_flowey_world_controller_Step_0

(view raw script w/o annotations or w/e)
1
if live_call()
2
    return global.live_result;
3
depth = -999999
4
switch scene
5
{
6
    case 0:
7
        entrance_sound = audio_play_sound(snd_flowey_world_entrance, 1, 0)
8
        cutscene_advance()
9
        break
10
    case 1:
11
        var sound_percentage = audio_sound_get_track_position(entrance_sound) / audio_sound_length(entrance_sound)
12
        var ef_distort = layer_get_fx("distort")
13
        var ef_scr = layer_get_fx("pixelate")
14
        fx_set_parameter(ef_distort, "g_DistortAmount", (40 - sound_percentage * 40))
15
        fx_set_parameter(ef_scr, "g_CellSize", (15 - sound_percentage * 15))
16
        if (!audio_is_playing(entrance_sound))
17
        {
18
            layer_set_visible("pixelate", false)
19
            layer_set_visible("distort", false)
20
            cutscene_advance()
21
        }
22
        break
23
    case 2:
24
        cutscene_wait(1.5)
25
        break
26
    case 3:
27
        if (!instance_exists(obj_flowey_world_text))
28
        {
29
            var msg = instance_create_depth(0, 0, -9999, obj_flowey_world_text)
30
            with (msg)
31
            {
32
                message[0] = "* You see, I've been#  watching you for a#  while."
33
                message[1] = "* Gosh, what run is it?#  Gotta be in the hundreds."
34
                message[2] = "* I've almost lost count!#  Haha..."
35
                soundfont = 96
36
            }
37
        }
38
        if (!global.dialogue_open)
39
            cutscene_advance()
40
        break
41
    case 4:
42
        actor_toriel = instance_create(obj_pl.x, (obj_pl.y + 100), obj_toriel_npc)
43
        cutscene_music = audio_play_sound(mus_flowey_world, 1, 1)
44
        cutscene_advance()
45
        break
46
    case 5:
47
        cutscene_npc_walk(actor_toriel, obj_pl.x, (obj_pl.y + 30), 1, "x", "up")
48
        break
49
    case 6:
50
        if cutscene_wait(1)
51
        {
52
            obj_clovsleep_flashback.is_active = true
53
            cutscene_advance(6.5)
54
        }
55
        break
56
    case 6.5:
57
        if cutscene_wait(1)
58
            cutscene_advance(7)
59
        break
60
    case 7:
61
        if (!instance_exists(obj_flowey_world_text))
62
        {
63
            msg = instance_create_depth(0, 0, -9999, obj_flowey_world_text)
64
            with (msg)
65
            {
66
                talker[0] = 1159
67
                message[0] = "* Ah! Hello!"
68
                message[1] = "* Are you all right?"
69
                message[2] = "* You must be wondering#  what is going on..."
70
                message[3] = "* I am TORIEL, caretaker#  of the RUINS."
71
                soundfont = 97
72
            }
73
        }
74
        if (obj_flowey_world_text.message_current >= 3)
75
            cutscene_wait(1.5)
76
        break
77
    case 8:
78
        cutscene_sfx_play(snd_flowey_world_transition, 1)
79
        instance_create_depth(0, 0, 0, obj_flashback_transition_glitch)
80
        break
81
    case 9:
82
        instance_destroy(obj_flowey_world_text)
83
        obj_pl.x = 40
84
        obj_pl.y = 192
85
        obj_pl.direction = 0
86
        actor_toriel.x = 248
87
        actor_toriel.y = 193
88
        actor_toriel.npc_direction = "left"
89
        actor_toriel.up_sprite_idle = 300
90
        cutscene_advance()
91
        break
92
    case 10:
93
        cutscene_wait(2)
94
        break
95
    case 11:
96
        if (!instance_exists(obj_flowey_world_text))
97
        {
98
            msg = instance_create_depth(0, 0, -9999, obj_flowey_world_text)
99
            with (msg)
100
            {
101
                message[0] = "* I let you carry on#  your merry way so#  many times."
102
                soundfont = 96
103
            }
104
        }
105
        if (!global.dialogue_open)
106
        {
107
            scr_cutscene_end
scr_cutscene_end

function scr_cutscene_end() //gml_Script_scr_cutscene_end { global.cutscene = false obj_pl.alarm[0] = 1 }
()
108
            cutscene_advance()
109
        }
110
        break
111
    case 12:
112
        if actor_toriel.interact
113
        {
114
            if (!instance_exists(obj_flowey_world_text))
115
            {
116
                global.cutscene = true
117
                msg = instance_create_depth(0, 0, -9999, obj_flowey_world_text)
118
                with (msg)
119
                {
120
                    if (other.tori_dialogue == 0)
121
                    {
122
                        other.tori_dialogue = 1
123
                        message[0] = "* Go on, press the#  switch on the left."
124
                        talker[0] = 1159
125
                        skippable = true
126
                    }
127
                    else
128
                    {
129
                        message[0] = "* You do know which#  way left is, do#  you not?"
130
                        message[1] = "* Press the switch that#  I labelled for you."
131
                        talker[0] = 1159
132
                        skippable = true
133
                    }
134
                    soundfont = 97
135
                }
136
            }
137
        }
138
        if (!global.dialogue_open)
139
            global.cutscene = false
140
        x_offset_prev = 0
141
        break
142
    case 13:
143
        obj_flowey_world_camera.x_offset = 0
144
        obj_flowey_world_camera.x_offset = choose(-5, 5)
145
        if (obj_flowey_world_camera.x_offset == x_offset_prev)
146
            obj_flowey_world_camera.x_offset *= -1
147
        if cutscene_wait(0.5)
148
            obj_flowey_world_camera.x_offset = 0
149
        break
150
    case 14:
151
        if actor_toriel.interact
152
        {
153
            if (!instance_exists(obj_flowey_world_text))
154
            {
155
                msg = instance_create_depth(0, 0, -9999, obj_flowey_world_text)
156
                with (msg)
157
                {
158
                    talker[0] = 1159
159
                    message[0] = "* Splendid!"
160
                    message[1] = "* I am proud of you,#  little one."
161
                    soundfont = 97
162
                }
163
            }
164
        }
165
        if (!global.dialogue_open)
166
            cutscene_advance()
167
        break
168
    case 15:
169
        cutscene_sfx_play(snd_flowey_world_transition, 1)
170
        instance_create_depth(0, 0, 0, obj_flashback_transition_glitch)
171
        break
172
    case 16:
173
        obj_pl.x = 500
174
        obj_pl.y = 220
175
        obj_pl.direction = 0
176
        actor_toriel.x = 560
177
        actor_toriel.y = 180
178
        actor_toriel.npc_direction = "down"
179
        scr_cutscene_end
scr_cutscene_end

function scr_cutscene_end() //gml_Script_scr_cutscene_end { global.cutscene = false obj_pl.alarm[0] = 1 }
()
180
        cutscene_advance()
181
        break
182
    case 17:
183
        if actor_toriel.interact
184
        {
185
            if (!instance_exists(obj_flowey_world_text))
186
            {
187
                global.cutscene = true
188
                msg = instance_create_depth(0, 0, -9999, obj_flowey_world_text)
189
                with (msg)
190
                {
191
                    message[0] = "* Go ahead and#  push the rock!"
192
                    talker[0] = 1159
193
                    skippable = true
194
                    soundfont = 97
195
                }
196
            }
197
            if (!global.dialogue_open)
198
                global.cutscene = false
199
        }
200
        break
201
    case 18:
202
        scr_cutscene_start
scr_cutscene_start

function scr_cutscene_start() //gml_Script_scr_cutscene_start { global.cutscene = true obj_pl.state = gml_Script_scr_frozen_state obj_pl.image_index = 0 obj_pl.image_speed = 0 }
()
203
        obj_flowey_world_camera.x_offset = 0
204
        obj_flowey_world_camera.x_offset = choose(-5, 5)
205
        if (obj_flowey_world_camera.x_offset == x_offset_prev)
206
            obj_flowey_world_camera.x_offset *= -1
207
        if cutscene_wait(0.5)
208
            obj_flowey_world_camera.x_offset = 0
209
        break
210
    case 19:
211
        if (!instance_exists(obj_flowey_world_text))
212
        {
213
            msg = instance_create_depth(0, 0, -9999, obj_flowey_world_text)
214
            with (msg)
215
            {
216
                talker[0] = 1159
217
                message[0] = "* You are learning#  so much, my child!"
218
                soundfont = 97
219
            }
220
        }
221
        if (!global.dialogue_open)
222
            cutscene_advance()
223
        break
224
    case 20:
225
        instance_create_depth(0, 0, 0, obj_flashback_transition_glitch)
226
        cutscene_advance()
227
        return;
228
    case 21:
229
        cutscene_npc_set_sprites(obj_toriel_npc, 3135, 59, 2613, 3261, 3135, 59, 2613, 3261)
230
        obj_pl.x = 896
231
        obj_pl.y = 288
232
        obj_pl.image_alpha = 0
233
        actor_toriel.x = 896
234
        actor_toriel.y = 288
235
        actor_toriel.npc_direction = "right"
236
        actor_toriel.sprite_index = spr_toriel_down_hold
237
        break
238
    case 22:
239
        cutscene_npc_walk(actor_toriel, 946, 288, 1, "x", "up", -4, 946, 192, 1028, 192, 1028, 288)
240
        cutscene_wait(1.25)
241
        break
242
    case 23:
243
        if (!instance_exists(obj_flowey_world_text))
244
        {
245
            msg = instance_create_depth(0, 0, -9999, obj_flowey_world_text)
246
            with (msg)
247
            {
248
                message[0] = "* I watched the same#  childish behavior play#  out over..."
249
                soundfont = 96
250
            }
251
        }
252
        if (!global.dialogue_open)
253
            cutscene_advance()
254
        break
255
    case 24:
256
        cutscene_wait(1.8)
257
        break
258
    case 25:
259
        instance_create_depth(0, 0, 0, obj_flashback_transition_glitch)
260
        cutscene_advance()
261
        break
262
    case 26:
263
        cutscene_npc_set_sprites(obj_toriel_npc, 3135, 2788, 2613, 3261, 3135, 2788, 2613, 3261)
264
        actor_toriel.x = 1215
265
        actor_toriel.y = 200
266
        actor_toriel.npc_direction = "right"
267
        obj_toriel_npc.current_destination = 0
268
        cutscene_advance()
269
        break
270
    case 27:
271
        cutscene_npc_walk(actor_toriel, 1460, 200, 1, "x", "right")
272
        cutscene_wait(1)
273
        break
274
    case 28:
275
        if (!instance_exists(obj_flowey_world_text))
276
        {
277
            msg = instance_create_depth(0, 0, -9999, obj_flowey_world_text)
278
            with (msg)
279
            {
280
                message[0] = "* And over..."
281
                soundfont = 96
282
            }
283
        }
284
        if (!global.dialogue_open)
285
            cutscene_advance()
286
        break
287
    case 29:
288
        cutscene_wait(1)
289
        break
290
    case 30:
291
        instance_create_depth(0, 0, 0, obj_flashback_transition_glitch)
292
        cutscene_advance()
293
        break
294
    case 31:
295
        actor_toriel.x = 1560
296
        actor_toriel.y = 200
297
        actor_toriel.npc_direction = "right"
298
        cutscene_advance()
299
        obj_toriel_npc.current_destination = 0
300
        break
301
    case 32:
302
        cutscene_npc_walk(actor_toriel, 1640, 200, 1, "x", "right")
303
        break
304
    case 33:
305
        cutscene_wait(0.5)
306
        break
307
    case 34:
308
        if (obj_flowey_world_blook.image_alpha > 0)
309
            obj_flowey_world_blook.image_alpha -= 0.1
310
        else
311
            cutscene_advance()
312
        break
313
    case 35:
314
        cutscene_wait(0.25)
315
        break
316
    case 36:
317
        cutscene_npc_walk(actor_toriel, 1740, 164, 1, "x", "up")
318
        cutscene_advance()
319
        break
320
    case 37:
321
        if (!instance_exists(obj_flowey_world_text))
322
        {
323
            msg = instance_create_depth(0, 0, -9999, obj_flowey_world_text)
324
            with (msg)
325
            {
326
                message[0] = "* And over."
327
                soundfont = 96
328
            }
329
        }
330
        if (!global.dialogue_open)
331
            cutscene_advance()
332
        break
333
    case 38:
334
        cutscene_wait(0.5)
335
        break
336
    case 39:
337
        if (overlay_alpha < 0.99)
338
            overlay_alpha = lerp(overlay_alpha, 1, 0.05)
339
        else
340
            cutscene_advance()
341
        break
342
    case 40:
343
        cutscene_wait(1)
344
        break
345
    case 41:
346
        if (!instance_exists(obj_flowey_world_text))
347
        {
348
            msg = instance_create_depth(0, 0, -9999, obj_flowey_world_text)
349
            with (msg)
350
            {
351
                message[0] = "* Sure, small decisions#  here and there would#  vary but..."
352
                soundfont = 96
353
            }
354
        }
355
        if (!global.dialogue_open)
356
            cutscene_advance()
357
        break
358
    case 42:
359
        cutscene_wait(0.5)
360
        break
361
    case 43:
362
        room = rm_flashback_02
363
        obj_pl.x = 160
364
        obj_pl.y = 100
365
        cutscene_advance()
366
        break
367
    case 44:
368
        if (overlay_alpha > 0.01)
369
            overlay_alpha = lerp(overlay_alpha, 0, 0.05)
370
        else
371
        {
372
            overlay_alpha = 0
373
            cutscene_advance()
374
        }
375
        break
376
    case 45:
377
        cutscene_wait(1)
378
        break
379
    case 46:
380
        if (!instance_exists(obj_flowey_world_text))
381
        {
382
            msg = instance_create_depth(0, 0, -9999, obj_flowey_world_text)
383
            with (msg)
384
            {
385
                message[0] = "* The journey would always#  end with you ignorantly#  living with Toriel."
386
                message[1] = "* I had to interfere."
387
                soundfont = 96
388
            }
389
        }
390
        if (!global.dialogue_open)
391
            cutscene_advance()
392
        break
393
    case 47:
394
        cutscene_wait(1)
395
        break
396
    case 48:
397
        obj_chairiel.can_talk = false
398
        if (overlay_alpha < 0.99)
399
            overlay_alpha = lerp(overlay_alpha, 1, 0.05)
400
        else
401
            cutscene_advance()
402
        break
403
    case 49:
404
        cutscene_wait(1)
405
        break
406
    case 50:
407
        if (!instance_exists(obj_flowey_world_text))
408
        {
409
            msg = instance_create_depth(0, 0, -9999, obj_flowey_world_text)
410
            with (msg)
411
            {
412
                message[0] = "* At first, my efforts#  seemed to work."
413
                soundfont = 96
414
            }
415
        }
416
        if (!global.dialogue_open)
417
            cutscene_advance()
418
        break
419
    case 51:
420
        actor_toriel = instance_create(480, 70, obj_toriel_npc)
421
        actor_toriel.npc_direction = "up"
422
        obj_pl.x = 480
423
        obj_pl.y = 130
424
        obj_pl.direction = 90
425
        obj_pl.image_alpha = 1
426
        cutscene_advance()
427
        break
428
    case 52:
429
        if (overlay_alpha > 0.01)
430
            overlay_alpha = lerp(overlay_alpha, 0, 0.05)
431
        else
432
        {
433
            overlay_alpha = 0
434
            music_stop_noloop = false
435
            instance_create(0, 0, obj_flashback_02_toriel_mini_cutscene)
436
            cutscene_advance()
437
        }
438
        break
439
    case 53:
440
        cutscene_wait(1)
441
        break
442
    case 54:
443
        if (!instance_exists(obj_flowey_world_text))
444
        {
445
            msg = instance_create_depth(0, 0, -9999, obj_flowey_world_text)
446
            with (msg)
447
            {
448
                message[0] = "* Tensions rose and you#  left the Ruins."
449
                message[1] = "* But then, other#  issues crept up..."
450
            }
451
        }
452
        else if (obj_flowey_world_text.message_current >= 1 && (!music_stop_noloop))
453
        {
454
            scr_audio_fade_out
scr_audio_fade_out

function scr_audio_fade_out(argument0, argument1) //gml_Script_scr_audio_fade_out { var snd = argument0 var fade_len = argument1 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 }
(cutscene_music, 500)
455
            music_stop_noloop = true
456
        }
457
        if (!global.dialogue_open)
458
            cutscene_advance()
459
        break
460
    case 55:
461
        cutscene_wait(1)
462
        break
463
    case 56:
464
        if (overlay_alpha < 0.99)
465
            overlay_alpha = lerp(overlay_alpha, 1, 0.05)
466
        else
467
        {
468
            instance_destroy(obj_flashback_02_toriel_mini_cutscene)
469
            cutscene_advance()
470
        }
471
        break
472
    case 57:
473
        cutscene_wait(0.5)
474
        break
475
    case 58:
476
        if (!instance_exists(obj_flowey_world_text))
477
        {
478
            msg = instance_create_depth(0, 0, -9999, obj_flowey_world_text)
479
            with (msg)
480
            {
481
                message[0] = "* No matter how many#  times you journeyed on..."
482
                keep_on_screen = true
483
            }
484
        }
485
        if cutscene_wait(2.5)
486
            cutscene_music = audio_play_sound(mus_flowey_soundscape, 1, 0)
487
        break
488
    case 59:
489
        cutscene_advance()
490
        break
491
    case 60:
492
        obj_pl.x = 740
493
        obj_pl.y = 80
494
        obj_pl.direction = 0
495
        cutscene_advance()
496
        break
497
    case 61:
498
        if (overlay_alpha > 0.01)
499
            overlay_alpha = lerp(overlay_alpha, 0, 0.1)
500
        else
501
        {
502
            overlay_alpha = 0
503
            with (obj_flowey_world_stalagmites)
504
                active = true
505
            global.dialogue_open = false
506
            cutscene_advance()
507
            scr_cutscene_end
scr_cutscene_end

function scr_cutscene_end() //gml_Script_scr_cutscene_end { global.cutscene = false obj_pl.alarm[0] = 1 }
()
508
        }
509
        break
510
    case 62:
511
        if instance_exists(obj_heart_flowey_world_split)
512
            cutscene_advance()
513
        break
514
    case 63:
515
        cutscene_wait(4)
516
        break
517
    case 64:
518
        if (!instance_exists(obj_flowey_world_text))
519
        {
520
            msg = instance_create_depth(0, 0, -9999, obj_flowey_world_text)
521
            with (msg)
522
            {
523
                message[0] = "* You always died."
524
                keep_on_screen = true
525
            }
526
        }
527
        cutscene_wait(2.5)
528
        break
529
    case 65:
530
        cutscene_advance()
531
        break
532
    case 66:
533
        obj_pl.x = 1140
534
        obj_pl.y = 100
535
        obj_pl.direction = 0
536
        cutscene_advance()
537
        break
538
    case 67:
539
        if (overlay_alpha > 0.01)
540
            overlay_alpha = lerp(overlay_alpha, 0, 0.2)
541
        else
542
        {
543
            overlay_alpha = 0
544
            instance_create(0, 0, obj_flowey_world_spear_spawner)
545
            scr_cutscene_end
scr_cutscene_end

function scr_cutscene_end() //gml_Script_scr_cutscene_end { global.cutscene = false obj_pl.alarm[0] = 1 }
()
546
            cutscene_advance()
547
        }
548
        break
549
    case 68:
550
        if instance_exists(obj_heart_flowey_world_split)
551
            cutscene_advance()
552
        break
553
    case 69:
554
        cutscene_wait(3)
555
        break
556
    case 70:
557
        obj_pl.x = 2320
558
        obj_pl.y = 100
559
        obj_pl.direction = 0
560
        cutscene_advance()
561
        break
562
    case 71:
563
        if (overlay_alpha > 0.01)
564
            overlay_alpha = lerp(overlay_alpha, 0, 0.2)
565
        else
566
        {
567
            overlay_alpha = 0
568
            cutscene_advance()
569
            scr_cutscene_end
scr_cutscene_end

function scr_cutscene_end() //gml_Script_scr_cutscene_end { global.cutscene = false obj_pl.alarm[0] = 1 }
()
570
        }
571
        break
572
    case 72:
573
        show_debug_message(obj_flowey_world_camera.x_min[4])
574
        if (obj_pl.x < 2084)
575
        {
576
            with (obj_flowey_world_lasers)
577
                lasers_activate = true
578
            cutscene_advance()
579
        }
580
        break
581
    case 73:
582
        if (obj_flowey_world_lasers.lasers_active == true)
583
        {
584
            instance_create_depth(obj_pl.x, obj_pl.y, obj_pl.depth, obj_flowey_world_clover_dead)
585
            cutscene_advance()
586
        }
587
        break
588
    case 74:
589
        cutscene_wait(1)
590
        break
591
    case 75:
592
        instance_create_depth((camera_get_view_x(view_camera[0]) + 160), (camera_get_view_y(view_camera[0]) + 80), (obj_flowey_world_controller.depth - 1), obj_heart_flowey_world_split_fast)
593
        instance_destroy(obj_flowey_world_clover_dead)
594
        cutscene_advance()
595
        break
596
    case 76:
597
        cutscene_wait(3)
598
        break
599
    case 77:
600
        global.dialogue_open = false
601
        scr_audio_fade_out
scr_audio_fade_out

function scr_audio_fade_out(argument0, argument1) //gml_Script_scr_audio_fade_out { var snd = argument0 var fade_len = argument1 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 }
(cutscene_music, 500)
602
        cutscene_advance()
603
        break
604
    case 78:
605
        if (!instance_exists(obj_flowey_world_text))
606
        {
607
            msg = instance_create_depth(0, 0, -9999, obj_flowey_world_text)
608
            with (msg)
609
                message[0] = "* I had to steer you#  off the path of failure#  as early as possible."
610
        }
611
        if cutscene_wait(3.5)
612
            global.dialogue_open = false
613
        break
614
    case 79:
615
        room = rm_flashback_01
616
        obj_pl.x = 196
617
        obj_pl.y = 120
618
        obj_pl.image_alpha = 0
619
        cutscene_advance()
620
        break
621
    case 80:
622
        layer_set_visible("pixelate", false)
623
        layer_set_visible("distort", false)
624
        cutscene_instance_create(196, 122, obj_tampering_flowey)
625
        break
626
    case 81:
627
        if (overlay_alpha > 0.01)
628
            overlay_alpha = lerp(overlay_alpha, 0, 0.05)
629
        else
630
        {
631
            overlay_alpha = 0
632
            cutscene_advance()
633
        }
634
        break
635
    case 82:
636
        obj_tampering_flowey.is_active = true
637
        cutscene_advance()
638
        break
639
    case 83:
640
        if (!instance_exists(obj_flowey_world_text))
641
        {
642
            msg = instance_create_depth(0, 0, -9999, obj_flowey_world_text)
643
            with (msg)
644
            {
645
                message[0] = "* So I tampered with#  a little switch and..."
646
                message[1] = "* Well, the rest#  is history!"
647
            }
648
        }
649
        if (!global.dialogue_open)
650
            cutscene_advance()
651
        break
652
    case 84:
653
        if (overlay_alpha < 0.99)
654
            overlay_alpha = lerp(overlay_alpha, 1, 0.05)
655
        else
656
            cutscene_advance()
657
        break
658
    case 85:
659
        room = rm_flashback_03
660
        cutscene_wait(1.5)
661
        break
662
    case 86:
663
        obj_pl.direction = 90
664
        instance_create_depth((camera_get_view_x(view_camera[0]) + 160), (camera_get_view_y(view_camera[0]) + 40), -99999, obj_flowey_rooftop_big)
665
        instance_create((camera_get_view_x(view_camera[0]) + 160), (camera_get_view_y(view_camera[0]) + 180), obj_player_npc)
666
        cutscene_advance()
667
        break
668
    case 87:
669
        if (overlay_alpha > 0.01)
670
            overlay_alpha = lerp(overlay_alpha, 0, 0.05)
671
        else
672
        {
673
            noise_pop = 0
674
            cutscene_advance()
675
        }
676
        break
677
    case 88:
678
        if (!instance_exists(obj_dialogue_flowey_alone))
679
            msg_flowey = instance_create(x, y, obj_dialogue_flowey_alone)
680
        if (!global.dialogue_open)
681
        {
682
            cutscene_advance()
683
            return true;
684
        }
685
        with (msg_flowey)
686
        {
687
            sndfnt = 96
688
            message[0] = "* ..."
689
            message[1] = "* Oh come on! You're still here?"
690
            message[2] = "* I thought at least my story#  might bore you so much that#  you'd give in!"
691
            message[3] = "* You really wanna do this the#  hard way? "
692
            message[4] = "* Haha, alright then!"
693
            message[5] = "* Let's have a little fun before#  I absorb your SOUL for good!"
694
            switch message_current
695
            {
696
                case 0:
697
                    var flowey_face = spr_flowey_big_plain
698
                    break
699
                case 1:
700
                    flowey_face = spr_flowey_big_angry
701
                    break
702
                case 2:
703
                    flowey_face = spr_flowey_big_unamused
704
                    break
705
                case 3:
706
                    flowey_face = spr_flowey_big_evil
707
                    break
708
                case 4:
709
                    flowey_face = spr_flowey_big_wink
710
                    break
711
                case 5:
712
                    flowey_face = spr_flowey_big_smirk
713
                    break
714
                default:
715
                    flowey_face = spr_flowey_big_neutral
716
                    break
717
            }
718
719
            switch message_current
720
            {
721
                case 3:
722
                case 4:
723
                    if (other.noise_pop < message_current)
724
                    {
725
                        other.noise_pop = message_current
726
                        instance_create_depth(obj_flowey_rooftop_big.x, obj_flowey_rooftop_big.y, -999990, obj_flowey_rooftop_noise)
727
                    }
728
                    break
729
            }
730
731
            if (message_current == 3)
732
            {
733
                sndfnt = 664
734
                shake = true
735
            }
736
            else
737
            {
738
                sndfnt = 96
739
                shake = false
740
            }
741
        }
742
        obj_flowey_rooftop_big.sprite_index = flowey_face
743
        break
744
    case 89:
745
        var x_original = obj_player_npc.xstart
746
        var y_original = obj_player_npc.ystart
747
        if (shake_intensity < 1)
748
            shake_intensity = lerp(shake_intensity, 1.1, 0.02)
749
        else
750
        {
751
            obj_player_npc.x = x_original
752
            obj_player_npc.y = y_original
753
            cutscene_advance()
754
            return;
755
        }
756
        obj_player_npc.x = x_original
757
        obj_player_npc.y = y_original
758
        obj_player_npc.x = x_original + (random_range(shake_intensity, (-shake_intensity)))
759
        obj_player_npc.y = y_original + (random_range(shake_intensity, (-shake_intensity)))
760
        break
761
    case 90:
762
        clover_hurt_count -= 1
763
        audio_play_sound(snd_hurt, 1, 0)
764
        cutscene_instance_create(obj_player_npc.x, obj_player_npc.y, obj_particle_flowey_world_clover_bits)
765
        cutscene_screenshake(0.5, 2)
766
        cutscene_advance(90.5)
767
        break
768
    case 90.5:
769
        if (clover_hurt_count > 0)
770
        {
771
            if cutscene_wait(1)
772
                cutscene_advance(90)
773
        }
774
        else if cutscene_wait(1.5)
775
            cutscene_advance(91)
776
        break
777
    case 91:
778
        instance_create_depth(((obj_player_npc.x + 1) * 2), (obj_player_npc.y * 2), (obj_player_npc.depth + 1), obj_heart_flowey_battle_dummy)
779
        with (obj_player_npc)
780
        {
781
            scr_clover_defragment
scr_clover_defragment

function scr_clover_defragment() //gml_Script_scr_clover_defragment { if live_call() return global.live_result; var width = sprite_get_width(sprite_index) var height = sprite_get_height(sprite_index) i_inc = width / 20 j_inc = 2 var x_left = x - sprite_xoffset var y_top = y + sprite_yoffset - sprite_height for (var j = spr_collisionbox; j < height; j += j_inc) { part = instance_create(x_left, (y_top + j), obj_piece_clover) with (part) { target_x = other.x target_y = other.y left = 0 top = j width = width height = other.j_inc sprite_index = other.sprite_index alarm[0] if (j == spr_collisionbox) event_perform(ev_alarm, 0) } } }
()
782
            instance_destroy(obj_player_npc, false)
783
        }
784
        cutscene_advance()
785
        break
786
    case 92:
787
        cutscene_wait(3)
788
        break
789
    case 93:
790
        with (obj_heart_flowey_battle_dummy)
791
        {
792
            x = lerp(x, 320, 0.05)
793
            y = lerp(y, 320, 0.05)
794
            if (point_distance(x, y, 320, 320) < 1)
795
                other.scene++
796
        }
797
        break
798
    case 94:
799
        global.battle_enemy_name = "flowey"
800
        global.battling_boss = true
801
        global.battle_start = true
802
        global.sound_carry_overworld = false
803
        if (room != rm_death_screen)
804
            global.current_room_overworld = room_get_name(room)
805
        instance_destroy(obj_heart_flowey_battle_dummy)
806
        room_goto(rm_battle_flowey Flowey - Phase 1 Battle Room)
807
        obj_flowey_rooftop_big.persistent = true
808
        obj_flowey_rooftop_big.image_xscale_base *= 2
809
        obj_flowey_rooftop_big.image_yscale_base *= 2
810
        obj_flowey_rooftop_big.x *= 2
811
        obj_flowey_rooftop_big.y *= 2
812
        cutscene_advance()
813
        break
814
    case 95:
815
        cutscene_wait(1)
816
        break
817
    case 96:
818
        with (instance_create_depth(obj_flowey_rooftop_big.x, obj_flowey_rooftop_big.y, -999990, obj_flowey_rooftop_noise))
819
        {
820
            image_xscale *= 2
821
            image_yscale *= 2
822
        }
823
        obj_flowey_rooftop_big.image_alpha = 0
824
        cutscene_advance()
825
        break
826
    case 97:
827
        cutscene_wait(0.5)
828
        break
829
    case 98:
830
        instance_create_depth(obj_flowey_rooftop_big.x, 140, -999990, obj_battle_flowey_body_1)
831
        instance_create_depth(obj_flowey_rooftop_big.x, 140, -999991, obj_flowey_battle_noise)
832
        global.image_alpha_enemy_attacking_immunity = true
833
        instance_destroy(obj_flowey_rooftop_big)
834
        cutscene_advance()
835
        break
836
    case 99:
837
        cutscene_wait(1)
838
        break
839
    case 100:
840
        while (instance_number(obj_battle_enemy_attack_fpellets) < 5)
841
            instance_create_depth(obj_battle_flowey_body_1.x, obj_battle_flowey_body_1.y, -1000, obj_battle_enemy_attack_fpellets)
842
        fight_music = audio_play_sound(mus_flowey_final_boss_1_intro, 1, 0)
843
        cutscene_advance()
844
        break
845
    case 101:
846
        cutscene_wait(1)
847
        break
848
    case 102:
849
        instance_create_depth(367, 110, -999, obj_quote_bubble_battle)
850
        instance_create_depth(0, 0, -9999, obj_quote_battle_flowey_final_1)
851
        cutscene_advance()
852
        break
853
    case 103:
854
        if instance_exists(obj_quote_battle_flowey_final_1)
855
            return;
856
        with (obj_battle_enemy_attack_fpellets)
857
        {
858
            move = true
859
            depth = obj_battle_flowey_body_1.depth - 1
860
        }
861
        glitch_number = 0
862
        cutscene_advance()
863
        break
864
    case 104:
865
        var mus_pos = audio_sound_get_track_position(fight_music)
866
        var mus_length = audio_sound_length(fight_music)
867
        var glitch_out = false
868
        switch glitch_number
869
        {
870
            case 0:
871
                if (mus_pos >= 8.7)
872
                    glitch_out = true
873
                break
874
            case 1:
875
                if (mus_pos >= 11.1)
876
                    glitch_out = true
877
                break
878
            case 2:
879
                if (mus_pos >= 14.4)
880
                    glitch_out = true
881
                break
882
            case 3:
883
                if (mus_pos >= 16.5)
884
                    glitch_out = true
885
                break
886
            case 4:
887
                if (mus_pos >= 17.5)
888
                    glitch_out = true
889
                obj_battle_flowey_body_1.image_alpha = 0
890
                break
891
            case 5:
892
                if (mus_pos >= 17.6)
893
                    glitch_out = true
894
                break
895
            case 6:
896
                if (mus_pos >= mus_length)
897
                {
898
                    glitch_out = true
899
                    white_overlay_alpha = 1
900
                    global.battle_music = audio_play_sound(mus_flowey_final_boss_1_main, 1, 1)
901
                    cutscene_advance()
902
                }
903
                break
904
        }
905
906
        if (glitch_out == true)
907
        {
908
            instance_create_depth(0, 0, -99999999, obj_flowey_battle_screen_glitch)
909
            glitch_number += 1
910
        }
911
        break
912
    case 105:
913
        obj_battle_flowey_body_1.image_alpha = 1
914
        global.image_alpha_enemy_attacking = 1
915
        cutscene_advance()
916
        instance_create_depth(0, 0, 0, obj_battle_flowey_background_ui)
917
        instance_destroy(obj_dialogue_box_battle_transformation_any_out)
918
        with (obj_dialogue_box_battle_transformation_any)
919
            event_user(0)
920
        scr_savegame_flowey
scr_savegame_flowey

function scr_savegame_flowey() //gml_Script_scr_savegame_flowey { ini_open("Save.sav") ini_write_real("Save1", "pX", obj_pl.x) ini_write_real("Save1", "pY", obj_pl.y) ini_write_real("Save1", "dir", obj_pl.direction) var SavedRoom = room ini_write_real("Save1", "HP", global.current_hp_self) ini_write_real("Save1", "MAXHP", global.max_hp_self) ini_write_real("Save1", "PP", global.current_pp_self) ini_write_real("Save1", "MAXPP", global.max_pp_self) ini_write_real("Save1", "SP", global.current_sp_self) ini_write_real("Save1", "MAXSP", global.max_sp_self) ini_write_real("Save1", "RP", global.current_rp_self) ini_write_real("Save1", "MAXRP", global.max_rp_self) ini_write_real("Save1", "AT - Primary", global.player_attack) ini_write_real("Save1", "AT - Secondary", global.player_weapon_modifier_attack) ini_write_real("Save1", "DFP", global.player_defense) ini_write_real("Save1", "DFS", global.player_armor_modifier_defense) ini_write_real("Save1", "LV", global.player_level) ini_write_real("Save1", "EXP", global.player_exp) ini_write_real("Save1", "Gold", global.player_gold) ini_write_string("Save1", "Armor", global.player_armor) ini_write_string("Save1", "Weapon", global.player_weapon) ini_write_string("Save1", "Ammo", global.player_weapon_modifier) ini_write_string("Save1", "Accessory", global.player_armor_modifier) ini_write_string("Save1", "rmName", "???") ini_write_string("Save1", "playerSprite", global.player_sprites) ini_write_real("Save1", "playerCanRun", global.player_can_run) if (global.party_member == noone) ini_write_string("Save1", "Follower", "noone") else ini_write_string("Save1", "Follower", object_get_name(global.party_member)) ini_write_real("Save1", "Satchel", global.player_has_satchel) ini_write_real("Save1", "FTravel", global.player_can_travel) scr_determine_playtime() ini_write_real("Playtime", "Seconds", global.elapsed_seconds) var ds_list_encounters = ds_list_write(global.encounter_list) ini_write_string("Encounters", "0", ds_list_encounters) var ds_list_steal = ds_list_write(global.steal_list) ini_write_string("Steal", "0", ds_list_steal) var ds_list_fasttravel = ds_list_write(global.fast_travel_list) ini_write_string("FastTravel", "0", ds_list_fasttravel) var inv1 = global.item_slot[1] ini_write_string("Items", "00", global.item_slot[1]) ini_write_string("Items", "01", global.item_slot[2]) ini_write_string("Items", "02", global.item_slot[3]) ini_write_string("Items", "03", global.item_slot[4]) ini_write_string("Items", "04", global.item_slot[5]) ini_write_string("Items", "05", global.item_slot[6]) ini_write_string("Items", "06", global.item_slot[7]) ini_write_string("Items", "07", global.item_slot[8]) var ds_list_string = ds_list_write(global.box_slot_list) ini_write_string("DBox", "0", ds_list_string) ini_write_real("Misc", "01", global.tinypuzzle) for (var i = 0; i < array_length_1d(global.ruins_flag); i++) ini_write_real("RuinsFlags", string(i), global.ruins_flag[i]) for (i = 0; i < array_length_1d(global.flag); i++) ini_write_real("Flags", string(i), global.flag[i]) for (i = 0; i < array_length_1d(global.snowdin_flag); i++) ini_write_real("SnowdinFlags", string(i), global.snowdin_flag[i]) for (i = 0; i < array_length_1d(global.dunes_flag); i++) ini_write_real("DunesFlags", string(i), global.dunes_flag[i]) for (i = 0; i < array_length_1d(global.dunes_flag_ext); i++) ini_write_real("DunesFlagsExt", string(i), global.dunes_flag_ext[i]) for (i = 0; i < array_length_1d(global.sworks_flag); i++) ini_write_real("SworksFlags", string(i), global.sworks_flag[i]) ini_write_string("SworksFlags", "code", global.factory_code) ds_list_string = ds_list_write(global.factory_code_2) ini_write_string("SworksFlags", "code2", ds_list_string) ini_write_string("SworksFlags", "code3", global.factory_code_3) ini_write_real("SworksFlags", "RbCount", global.sworks_robot_count) for (i = 0; i < global.sworks_robot_count; i++) { ini_write_real("RbSprite", string(i), global.sworks_robot_sprite[i]) ini_write_real("RbX", string(i), global.sworks_robot_x[i]) ini_write_real("RbY", string(i), global.sworks_robot_y[i]) ini_write_real("RbD", string(i), global.sworks_robot_depth[i]) ini_write_real("RbS", string(i), global.sworks_robot_scale[i]) ini_write_real("RbA", string(i), global.sworks_robot_angle[i]) } ini_write_string("SworksFlags", "sworks_id", ds_grid_write(global.sworks_id_grid)) for (i = 0; i < array_length_1d(global.item_stock); i++) ini_write_real("ItemStock", string(i), global.item_stock[i]) for (i = 0; i < array_length_1d(global.hotland_flag); i++) ini_write_real("HotlandFlags", string(i), global.hotland_flag[i]) for (i = 0; i < array_length_1d(global.flowey_flag); i++) ini_write_real("FloweyFlags", string(i), global.flowey_flag[i]) ini_write_real("FloweyFlags", "savenumber", global.flowey_save_number) for (i = 0; i < array_length_1d(global.extra_flag); i++) ini_write_real("ExtraFlags", string(i), global.extra_flag[i]) for (i = 0; i < array_length_1d(global.mail_flag); i++) ini_write_real("MailFlags", string(i), global.mail_flag[i]) ds_list_string = ds_list_write(global.mail_list) ini_write_string("Mail", "0", ds_list_string) ds_list_string = ds_list_write(global.mail_unclaimed_list) ini_write_string("MailUnclaimed", "0", ds_list_string) ini_write_real("Mail", "1", global.mail_count) for (i = 0; i <= 5; i++) ini_write_real("Misc", string(i + 2), global.sideNpc[i]) var ds_map_string = ds_map_write(global.npc_map) ...
()
921
        break
922
    case 106:
923
        white_overlay_alpha = lerp(white_overlay_alpha, 0, 0.2)
924
        if (white_overlay_alpha < 0.01)
925
        {
926
            obj_battle_flowey_body_1.depth = 0
927
            obj_battle_flowey_body_1.can_draw_ghost = true
928
            global.image_alpha_enemy_attacking_immunity = false
929
            instance_destroy()
930
            return;
931
        }
932
        break
933
}
934
935
if (scene >= 21 && scene < 42)
936
{
937
    obj_pl.x = actor_toriel.x
938
    obj_pl.y = actor_toriel.y
939
}