Undertale Yellow script viewer

← back to main script listing

gml_Object_obj_dunes_2_controller_Step_0

(view raw script w/o annotations or w/e)
1
switch (scene)
2
{
3
    case 0:
4
        if (obj_pl.x >= 720)
5
        {
6
            instance_create(obj_pl.x, obj_pl.y, obj_player_npc);
7
            instance_destroy(obj_doorway);
8
            scr_cutscene_start
scr_cutscene_start

function scr_cutscene_start() { global.cutscene = true; obj_pl.state = scr_frozen_state; obj_pl.image_index = 0; obj_pl.image_speed = 0; }
();
9
            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; }
(obj_radio.current_song, 1000);
10
            cutscene_advance();
11
        }
12
        break;
13
    case 1:
14
        cutscene_npc_walk(1168, 840, obj_player_npc.y, 3, "x", "right");
15
        scene++;
16
        break;
17
    case 2:
18
        cutscene_sfx_play(113, 1);
19
        break;
20
    case 3:
21
        cutscene_screen_fade_out(16777215, 0.0064);
22
        break;
23
    case 4:
24
        obj_screen_fade_effect.persistent = true;
25
        persistent = true;
26
        room = rm_dunes_03;
27
        obj_pl.x = 180;
28
        obj_pl.y = 180;
29
        obj_pl.image_alpha = 1;
30
        scene++;
31
        break;
32
    case 5:
33
        cutscene_wait(1.5);
34
        break;
35
    case 6:
36
        cutscene_screen_fade_in(0.0256);
37
        break;
38
    case 7:
39
        cutscene_wait(1);
40
        break;
41
    case 8:
42
        cutscene_end();
43
        global.dunes_flag[44] = 1;
44
        break;
45
}