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() //gml_Script_scr_timer { if (timer > 0) { timer-- return false; } else return true; }
())
18
            return;
19
        scr_text
scr_text

function scr_text() //gml_Script_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() //gml_Script_scr_timer { if (timer > 0) { timer-- return false; } else return true; }
())
36
            return;
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
            instance_create(xx, yy, obj_pl)
45
        scene++
46
        break
47
    case 3:
48
        fadealpha -= 0.05
49
        if (fadealpha <= 0)
50
            instance_destroy()
51
        break
52
}