Undertale Yellow script viewer

← back to main script listing

gml_Object_obj_dunes_38_cutscene_manager_Step_0

(view raw script w/o annotations or w/e)
1
if (live_call())
2
    return global.live_result;
3
switch (scene)
4
{
5
    case 0:
6
        if (!audio_is_playing(mus_gunshop))
7
        {
8
            audio_sound_gain(obj_radio.current_song, 0, 0);
9
            music = audio_play_sound(mus_gunshop, 20, 1);
10
        }
11
        if (!instance_exists(obj_starlo_npc))
12
        {
13
            starlo_npc = instance_create(40, 460, obj_starlo_npc);
14
            starlo_npc.npc_direction = "right";
15
            starlo_npc.image_alpha = 0;
16
            player_npc = instance_create(40, 460, obj_player_npc);
17
            player_npc.npc_direction = "right";
18
            player_npc.image_alpha = 0;
19
            blackjack_npc = instance_create(360, 350, obj_blackjack_npc);
20
            blackjack_npc.image_alpha = 0;
21
        }
22
        __view_set(e__VW.Object, 0, starlo_npc);
23
        with (starlo_npc)
24
        {
25
            if (image_alpha < 1)
26
            {
27
                image_alpha += 0.1;
28
            }
29
            else
30
            {
31
                x_dest[0] = 360;
32
                y_dest[0] = y;
33
                axis_override = "x";
34
                end_direction = "up";
35
                can_walk = true;
36
                actor_speed = 3;
37
                other.scene++;
38
                other.timer = 10;
39
            }
40
        }
41
        break;
42
    case 1:
43
        if (!scr_timer
scr_timer

function scr_timer() { if (timer > 0) { timer--; return false; } else { return true; } }
())
44
            exit;
45
        with (player_npc)
46
        {
47
            if (image_alpha < 1)
48
            {
49
                image_alpha += 0.1;
50
            }
51
            else
52
            {
53
                x_dest[0] = 320;
54
                y_dest[0] = y;
55
                axis_override = "x";
56
                end_direction = "up";
57
                can_walk = true;
58
                actor_speed = 3;
59
                other.scene++;
60
                other.timer = 10;
61
            }
62
        }
63
        break;
64
    case 2:
65
        if (player_npc.npc_arrived == false || !scr_timer
scr_timer

function scr_timer() { if (timer > 0) { timer--; return false; } else { return true; } }
())
66
            exit;
67
        with (starlo_npc)
68
        {
69
            npc_arrived = false;
70
            x_dest[0] = 360;
71
            y_dest[0] = 360;
72
            axis_override = "y";
73
            end_direction = "up";
74
            can_walk = true;
75
            actor_speed = 2;
76
        }
77
        scene++;
78
        timer = 20;
79
        break;
80
    case 3:
81
        if (!starlo_npc.npc_arrived || !scr_timer
scr_timer

function scr_timer() { if (timer > 0) { timer--; return false; } else { return true; } }
())
82
            exit;
83
        audio_play_sound(snd_locked_door, 1, 0);
84
        timer = 30;
85
        scene++;
86
        break;
87
    case 4:
88
        if (!scr_timer
scr_timer

function scr_timer() { if (timer > 0) { timer--; return false; } else { return true; } }
())
89
            exit;
90
        starlo_npc.npc_direction = "down";
91
        scr_text
scr_text

function scr_text() { if (!instance_exists(obj_dialogue)) msg = instance_create(x, y, obj_dialogue); }
();
92
        with (msg)
93
        {
94
            sndfnt = 107;
95
            talker[0] = other.starlo_npc;
96
            message[0] = "* Hehe, of course.";
97
            message[1] = "* Old Blackjack doesn't#  like doin' business#  with me.";
98
            message[2] = "* I often \"borrow\" his#  wares and uh... break or#  lose them.";
99
            prt[0] = 412;
100
            prt[1] = 407;
101
            prt[2] = 412;
102
        }
103
        if (!global.dialogue_open)
104
        {
105
            timer = 15;
106
            scene++;
107
        }
108
        break;
109
    case 5:
110
        if (!scr_timer
scr_timer

function scr_timer() { if (timer > 0) { timer--; return false; } else { return true; } }
())
111
            exit;
112
        starlo_npc.npc_direction = "up";
113
        audio_play_sound(snd_knock_beautiful, 1, 0);
114
        scene++;
115
        break;
116
    case 6:
117
        if (audio_is_playing(snd_knock_beautiful))
118
            exit;
119
        scr_text
scr_text

function scr_text() { if (!instance_exists(obj_dialogue)) msg = instance_create(x, y, obj_dialogue); }
();
120
        with (msg)
121
        {
122
            sndfnt = 107;
123
            talker[0] = other.starlo_npc;
124
            message[0] = "* Open up, Blackjack!";
125
            message[1] = "* Don't make me use force!";
126
            message[2] = "* I make the law so I can#  legally shoot down your#  doors!";
127
            prt[0] = 421;
128
            prt[1] = 419;
129
            prt[2] = 419;
130
        }
131
        if (!global.dialogue_open)
132
        {
133
            timer = 45;
134
            scene++;
135
        }
136
        break;
137
    case 7:
138
        scr_text
scr_text

function scr_text() { if (!instance_exists(obj_dialogue)) msg = instance_create(x, y, obj_dialogue); }
();
139
        with (msg)
140
        {
141
            if (talker[message_current] == other.starlo_npc)
142
                position = 0;
143
            if (talker[message_current] == other.blackjack_npc)
144
                position = 1;
145
            talker[0] = other.blackjack_npc;
146
            sndfnt_array[0] = 391;
147
            message[0] = "* Get off my property, North#  Star!";
148
            message[1] = "* I told you I wouldn't even sell#  you a gumball!";
149
            talker[2] = other.starlo_npc;
150
            sndfnt_array[2] = 107;
151
            message[2] = "* Aw, come on, partner.";
152
            message[3] = "* I don't even know what#  a \"gumball\" is!";
153
            message[4] = "* And those last#  transactions were ages#  ago!";
154
            message[5] = "* I'm a changed monster!";
155
            prt[2] = 406;
156
            prt[3] = 417;
157
            prt[4] = 413;
158
            prt[5] = 422;
159
            talker[6] = other.blackjack_npc;
160
            sndfnt_array[6] = 391;
161
            message[6] = "* You lost one of my premium#  revolvers last week!";
162
            message[7] = "* Frolicking in your sandstorm#  and whatnot.";
163
            talker[8] = other.starlo_npc;
164
            talker[9] = other.starlo_npc;
165
            sndfnt_array[8] = 107;
166
            message[8] = "* Look, I promise this is#  a different scenario,#  Jack.";
167
            message[9] = "* I won't even step#  inside. You can meet me#  out here.";
168
            prt[8] = 407;
169
            prt[9] = 421;
170
        }
171
        if (!global.dialogue_open)
172
        {
173
            scene++;
174
            timer = 45;
175
        }
176
        break;
177
    case 8:
178
        if (!scr_timer
scr_timer

function scr_timer() { if (timer > 0) { timer--; return false; } else { return true; } }
())
179
            exit;
180
        scr_text
scr_text

function scr_text() { if (!instance_exists(obj_dialogue)) msg = instance_create(x, y, obj_dialogue); }
();
181
        with (msg)
182
            message[0] = "* ...";
183
        if (!global.dialogue_open)
184
        {
185
            scene++;
186
            timer = 10;
187
        }
188
        break;
189
    case 9:
190
        if (!scr_timer
scr_timer

function scr_timer() { if (timer > 0) { timer--; return false; } else { return true; } }
())
191
            exit;
192
        with (starlo_npc)
193
        {
194
            npc_arrived = false;
195
            x_dest[0] = x;
196
            y_dest[0] = 460;
197
            axis_override = "y";
198
            end_direction = "left";
199
            can_walk = true;
200
            actor_speed = 2;
201
        }
202
        scene++;
203
        break;
204
    case 10:
205
        if (!starlo_npc.npc_arrived)
206
            exit;
207
        scr_text
scr_text

function scr_text() { if (!instance_exists(obj_dialogue)) msg = instance_create(x, y, obj_dialogue); }
();
208
        with (msg)
209
        {
210
            sndfnt = 107;
211
            talker[0] = other.starlo_npc;
212
            message[0] = "* Don't worry, Clover.#  He's comin'.";
213
            prt[0] = 417;
214
        }
215
        if (!global.dialogue_open)
216
        {
217
            audio_play_sound(snd_doorclose, 1, 0);
218
            scene++;
219
            starlo_npc.npc_direction = "up";
220
        }
221
        break;
222
    case 11:
223
        with (blackjack_npc)
224
        {
225
            if (image_alpha < 1)
226
            {
227
                image_alpha += 0.1;
228
            }
229
            else
230
            {
231
                x_dest[0] = x;
232
                y_dest[0] = y + 40;
233
                axis_override = "y";
234
                end_direction = "down";
235
                can_walk = true;
236
                actor_speed = 1;
237
                other.timer = 30;
238
                other.scene++;
239
            }
240
        }
241
        break;
242
    case 12:
243
        if (!blackjack_npc.npc_arrived || !scr_timer
scr_timer

function scr_timer() { if (timer > 0) { timer--; return false; } else { return true; } }
())
244
            exit;
245
        scr_text
scr_text

function scr_text() { if (!instance_exists(obj_dialogue)) msg = instance_create(x, y, obj_dialogue); }
();
246
        with (msg)
247
        {
248
            sndfnt_array[0] = 391;
249
            message[0] = "* Make it speedy.";
250
            sndfnt_array[1] = 107;
251
            talker[1] = other.starlo_npc;
252
            message[1] = "* Of cooourse, sir!";
253
            message[2] = "* I was just gunna ask#  you to sell a gun to#  this child.";
254
            prt[1] = 415;
255
            prt[2] = 422;
256
        }
257
        if (!global.dialogue_open)
258
        {
259
            scr_music_sudden_stop
scr_music_sudden_stop

function scr_music_sudden_stop(arg0, arg1, arg2) { with (instance_create(0, 0, obj_audio_sudden_stop_helper)) { audio_to_fade = arg0; fade_strength = arg1 / 100; audio_stop = arg2; if (audio_stop == false) audio_resume_sound(arg0); } }
(music, 3, 1);
260
            timer = 60;
261
            scene++;
262
        }
263
        break;
264
    case 13:
265
        if (!scr_timer
scr_timer

function scr_timer() { if (timer > 0) { timer--; return false; } else { return true; } }
())
266
            exit;
267
        with (blackjack_npc)
268
        {
269
            walk_direction_flip = true;
270
            npc_arrived = false;
271
            x_dest[0] = x;
272
            y_dest[0] = y - 40;
273
            axis_override = "y";
274
            end_direction = "up";
275
            can_walk = true;
276
            actor_speed = 3;
277
            other.scene++;
278
        }
279
        break;
280
    case 14:
281
        if (!blackjack_npc.npc_arrived)
282
            exit;
283
        with (blackjack_npc)
284
        {
285
            if (image_alpha > 0)
286
            {
287
                image_alpha -= 0.2;
288
            }
289
            else
290
            {
291
                audio_play_sound(snd_doorclose, 1, 0);
292
                other.scene++;
293
            }
294
        }
295
        break;
296
    case 15:
297
        scr_text
scr_text

function scr_text() { if (!instance_exists(obj_dialogue)) msg = instance_create(x, y, obj_dialogue); }
();
298
        with (msg)
299
        {
300
            sndfnt = 107;
301
            talker[0] = other.starlo_npc;
302
            message[0] = "* I worded that poorly,#  hold on!";
303
            message[1] = "* This ain't a child, you#  see. I was jokin'.";
304
            message[2] = "* They're just a very#  small, but VERY tough#  monster.";
305
            prt[0] = 428;
306
            prt[1] = 412;
307
            prt[2] = 417;
308
        }
309
        if (!global.dialogue_open)
310
        {
311
            timer = 45;
312
            scene++;
313
        }
314
        break;
315
    case 16:
316
        scr_text
scr_text

function scr_text() { if (!instance_exists(obj_dialogue)) msg = instance_create(x, y, obj_dialogue); }
();
317
        with (msg)
318
        {
319
            sndfnt_array[0] = 391;
320
            message[0] = "* ...";
321
            sndfnt_array[1] = 107;
322
            talker[1] = other.starlo_npc;
323
            talker[2] = other.starlo_npc;
324
            message[1] = "* Sigh...";
325
            message[2] = "* I'll give ya 400G.";
326
            prt[1] = 407;
327
            prt[2] = 418;
328
        }
329
        if (!global.dialogue_open)
330
        {
331
            audio_play_sound(snd_doorclose, 1, 0);
332
            scr_music_sudden_stop
scr_music_sudden_stop

function scr_music_sudden_stop(arg0, arg1, arg2) { with (instance_create(0, 0, obj_audio_sudden_stop_helper)) { audio_to_fade = arg0; fade_strength = arg1 / 100; audio_stop = arg2; if (audio_stop == false) audio_resume_sound(arg0); } }
(music, 5, 0);
333
            scene++;
334
        }
335
        break;
336
    case 17:
337
        with (blackjack_npc)
338
        {
339
            if (image_alpha < 1)
340
            {
341
                image_alpha += 0.1;
342
            }
343
            else
344
            {
345
                x_dest[0] = x;
346
                y_dest[0] = y + 40;
347
                can_walk = true;
348
                npc_arrived = false;
349
                end_direction = "down";
350
                walk_direction_flip = true;
351
                other.scene++;
352
            }
353
        }
354
        break;
355
    case 18:
356
        if (!blackjack_npc.npc_arrived)
357
            exit;
358
        scr_text
scr_text

function scr_text() { if (!instance_exists(obj_dialogue)) msg = instance_create(x, y, obj_dialogue); }
();
359
        with (msg)
360
        {
361
            message[0] = "* Well why didn't you open with#  that, kind patron?";
362
            message[1] = "* Come inside with me and I'll#  fetch the paperwork.";
363
        }
364
        if (!global.dialogue_open)
365
            scene++;
366
        break;
367
    case 19:
368
        starlo_npc.npc_direction = "left";
369
        scr_text
scr_text

function scr_text() { if (!instance_exists(obj_dialogue)) msg = instance_create(x, y, obj_dialogue); }
();
370
        with (msg)
371
        {
372
            sndfnt = 107;
373
            talker[0] = other.starlo_npc;
374
            message[0] = "* See? I had it under#  control.";
375
            message[1] = "* Wait out here, Clover.";
376
            prt[0] = 417;
377
            prt[1] = 417;
378
        }
379
        if (!global.dialogue_open)
380
            scene++;
381
        break;
382
    case 20:
383
        with (blackjack_npc)
384
        {
385
            x_dest[0] = x;
386
            y_dest[0] = y - 20;
387
            can_walk = true;
388
            npc_arrived = false;
389
            end_direction = "up";
390
        }
391
        with (starlo_npc)
392
        {
393
            x_dest[0] = other.blackjack_npc.x_dest[0];
394
            y_dest[0] = other.blackjack_npc.y_dest[0];
395
            can_walk = true;
396
            npc_arrived = false;
397
            end_direction = "up";
398
        }
399
        scene++;
400
        break;
401
    case 21:
402
        if (blackjack_npc.npc_arrived == true)
403
        {
404
            if (blackjack_npc.image_alpha > 0)
405
                blackjack_npc.image_alpha -= 0.1;
406
        }
407
        if (starlo_npc.npc_arrived == true)
408
        {
409
            if (starlo_npc.image_alpha > 0)
410
            {
411
                starlo_npc.image_alpha -= 0.1;
412
            }
413
            else
414
            {
415
                timer = 40;
416
                scene += 0.5;
417
            }
418
        }
419
        break;
420
    case 21.5:
421
        if (!scr_timer
scr_timer

function scr_timer() { if (timer > 0) { timer--; return false; } else { return true; } }
())
422
            exit;
423
        cutscene_sfx_play(59, 1);
424
        cutscene_advance(22);
425
        timer = 40;
426
        break;
427
    case 22:
428
        if (audio_is_playing(snd_starlo_buys_gun))
429
            exit;
430
        if (!scr_timer
scr_timer

function scr_timer() { if (timer > 0) { timer--; return false; } else { return true; } }
())
431
            exit;
432
        starlo_npc.npc_direction = "down";
433
        if (starlo_npc.image_alpha < 1)
434
        {
435
            starlo_npc.image_alpha += 0.1;
436
        }
437
        else
438
        {
439
            with (starlo_npc)
440
            {
441
                x_dest[0] = x;
442
                y_dest[0] = 420;
443
                can_walk = true;
444
                npc_arrived = false;
445
                end_direction = "down";
446
                other.scene++;
447
            }
448
        }
449
        break;
450
    case 23:
451
        if (!starlo_npc.npc_arrived)
452
            exit;
453
        scr_text
scr_text

function scr_text() { if (!instance_exists(obj_dialogue)) msg = instance_create(x, y, obj_dialogue); }
();
454
        with (msg)
455
        {
456
            sndfnt = 107;
457
            talker[0] = other.starlo_npc;
458
            message[0] = "* Done and done.";
459
            message[1] = "* Can I get a#  yeehaw?";
460
            prt[0] = 417;
461
            prt[1] = 424;
462
        }
463
        if (!global.dialogue_open)
464
        {
465
            timer = 30;
466
            scene++;
467
        }
468
        break;
469
    case 24:
470
        cutscene_npc_action_sprite(1169, 202, 1/3, true, 0, 232, 4);
471
        break;
472
    case 25:
473
        if (!scr_timer
scr_timer

function scr_timer() { if (timer > 0) { timer--; return false; } else { return true; } }
())
474
            exit;
475
        scr_text
scr_text

function scr_text() { if (!instance_exists(obj_dialogue)) msg = instance_create(x, y, obj_dialogue); }
();
476
        with (msg)
477
        {
478
            sndfnt = 107;
479
            talker[0] = other.starlo_npc;
480
            message[0] = "* ...";
481
            message[1] = "* Right. Movin' along.";
482
            prt[0] = 421;
483
            prt[1] = 407;
484
            if (message_current == 1)
485
                obj_starlo_npc.action_sprite = false;
486
        }
487
        if (!global.dialogue_open)
488
            scene++;
489
        break;
490
    case 26:
491
        with (starlo_npc)
492
        {
493
            x_dest[0] = 110;
494
            y_dest[0] = 400;
495
            axis_override = "x";
496
            can_walk = true;
497
            actor_speed = 3;
498
            npc_arrived = false;
499
            end_direction = "right";
500
        }
501
        timer = 30;
502
        scene++;
503
        break;
504
    case 27:
505
        if (!scr_timer
scr_timer

function scr_timer() { if (timer > 0) { timer--; return false; } else { return true; } }
())
506
            exit;
507
        with (player_npc)
508
        {
509
            x_dest[0] = 160;
510
            y_dest[0] = 400;
511
            axis_override = "x";
512
            can_walk = true;
513
            actor_speed = 3;
514
            npc_arrived = false;
515
            end_direction = "left";
516
        }
517
        scene++;
518
        break;
519
    case 28:
520
        if ((!player_npc.npc_arrived || !starlo_npc.npc_arrived) || !scr_timer
scr_timer

function scr_timer() { if (timer > 0) { timer--; return false; } else { return true; } }
())
521
            exit;
522
        scr_text
scr_text

function scr_text() { if (!instance_exists(obj_dialogue)) msg = instance_create(x, y, obj_dialogue); }
();
523
        with (msg)
524
        {
525
            sndfnt_array[0] = 107;
526
            talker[0] = other.starlo_npc;
527
            message[0] = "* Let's see what you got!";
528
            message[1] = "* Take this trusty#  six-shooter as a gift#  from me.";
529
            prt[0] = 419;
530
            prt[1] = 422;
531
        }
532
        if (!global.dialogue_open)
533
            scene++;
534
        break;
535
    case 29:
536
        player_npc.npc_direction = "left";
537
        cutscene_npc_walk(starlo_npc, obj_pl.x - 20, obj_pl.y, 2, "y", "right");
538
        break;
539
    case 30:
540
        cutscene_wait(0.25);
541
        break;
542
    case 31:
543
        scr_text
scr_text

function scr_text() { if (!instance_exists(obj_dialogue)) msg = instance_create(x, y, obj_dialogue); }
();
544
        with (msg)
545
        {
546
            sndfnt_array[0] = 391;
547
            talker[0] = -4;
548
            message[0] = "* (You got a Wild Revolver!)";
549
        }
550
        if (global.player_weapon != "Wild Revolver")
551
        {
552
            global.player_weapon = "Wild Revolver";
553
            audio_play_sound(snd_success, 1, 0);
554
        }
555
        if (!global.dialogue_open)
556
            scene++;
557
        break;
558
    case 32:
559
        cutscene_wait(0.25);
560
        break;
561
    case 33:
562
        player_npc.npc_direction = "up";
563
        cutscene_npc_walk(starlo_npc, 110, 400, 3, "x", "right");
564
        break;
565
    case 34:
566
        scr_audio_fade_out
scr_audio_fade_out

function 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; }
(music, 300);
567
        global.sound_carry_overworld = false;
568
        global.battle_enemy_name = "dummy training pacifist";
569
        global.battling_enemy = false;
570
        global.battling_boss = true;
571
        global.battle_start = true;
572
        global.current_room_overworld = room_get_name(room);
573
        instance_create(obj_pl.x, obj_pl.y, obj_heart_initiate_battle);
574
        obj_pl.direction = 90;
575
        obj_pl.sprite_index = spr_pl_up;
576
        obj_heart_initiate_battle.flash_delay = 6;
577
        scene++;
578
        break;
579
    case 35:
580
        if (room != rm_battle)
581
            exit;
582
        global.radio_pause = true;
583
        scene++;
584
        break;
585
    case 36:
586
        if (room == rm_battle)
587
            exit;
588
        global.radio_pause = false;
589
        obj_radio.music_position = 0;
590
        obj_pl.direction = 180;
591
        if (!instance_exists(obj_starlo_npc))
592
        {
593
            starlo_npc = instance_create(110, 400, obj_starlo_npc);
594
            starlo_npc.npc_direction = "right";
595
            player_npc = instance_create(160, 400, obj_player_npc);
596
        }
597
        if (!instance_exists(obj_overworld_fade_in_screen))
598
            exit;
599
        scr_audio_fade_out
scr_audio_fade_out

function 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; }
(music, 1000);
600
        timer = 50;
601
        scene++;
602
        break;
603
    case 37:
604
        if (!scr_timer
scr_timer

function scr_timer() { if (timer > 0) { timer--; return false; } else { return true; } }
())
605
            exit;
606
        scr_text
scr_text

function scr_text() { if (!instance_exists(obj_dialogue)) msg = instance_create(x, y, obj_dialogue); }
();
607
        with (msg)
608
        {
609
            sndfnt = 107;
610
            talker[0] = other.starlo_npc;
611
            message[0] = "* Ya definitely pass this#  part of trainin'!";
612
            message[1] = "* I gotta go tell Ceroba#  'bout this.";
613
            message[2] = "* She's a big doubter when#  it comes to you.";
614
            message[3] = "* Let's ride on!";
615
            prt[0] = 417;
616
            prt[1] = 422;
617
            prt[2] = 424;
618
            prt[3] = 417;
619
        }
620
        if (!global.dialogue_open)
621
        {
622
            timer = 30;
623
            scene++;
624
        }
625
        break;
626
    case 38:
627
        trn = instance_create(0, 0, obj_transition_clock);
628
        trn.newRoom = 128;
629
        trn.xx = 182;
630
        trn.yy = 195;
631
        instance_destroy();
632
        break;
633
}
634
635
enum e__VW
636
{
637
    XView,
638
    YView,
639
    WView,
640
    HView,
641
    Angle,
642
    HBorder,
643
    VBorder,
644
    HSpeed,
645
    VSpeed,
646
    Object,
647
    Visible,
648
    XPort,
649
    YPort,
650
    WPort,
651
    HPort,
652
    Camera,
653
    SurfaceID
654
}