Undertale Yellow script viewer

← back to main script listing

gml_Object_obj_cave_end_transition_Step_0

(view raw script w/o annotations or w/e)
1
switch (scene)
2
{
3
    case 0:
4
        fadealpha += 0.05;
5
        if (fadealpha >= 1)
6
        {
7
            audio_stop_sound(snd_rapids);
8
            audio_stop_sound(mus_ambient_river);
9
            if (global.snowdin_flag[13] == 1)
10
                scene = 1;
11
            else
12
                scene = 2;
13
            timer = 60;
14
        }
15
        break;
16
    case 1:
17
        if (!scr_timer
scr_timer

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

function scr_text() { if (!instance_exists(obj_dialogue)) msg = instance_create(x, y, obj_dialogue); }
();
20
        with (msg)
21
        {
22
            sndfnt = 102;
23
            portrait = false;
24
            message[0] = "* Hello? Clover? Are you okay?";
25
            message[1] = "* Ohno-ohno-ohno!";
26
            message[2] = "* You stay right there! I'll go#  get help!";
27
        }
28
        if (!global.dialogue_open)
29
        {
30
            scene++;
31
            timer = 60;
32
        }
33
        break;
34
    case 2:
35
        if (!scr_timer
scr_timer

function scr_timer() { if (timer > 0) { timer--; return false; } else { return true; } }
())
36
            exit;
37
        room_goto(newRoom);
38
        if (instance_exists(obj_pl))
39
        {
40
            obj_pl.x = xx;
41
            obj_pl.y = yy;
42
        }
43
        else
44
        {
45
            instance_create(xx, yy, obj_pl);
46
        }
47
        scene++;
48
        break;
49
    case 3:
50
        fadealpha -= 0.05;
51
        if (fadealpha <= 0)
52
            instance_destroy();
53
        break;
54
}