Undertale Yellow script viewer

← back to main script listing

gml_Object_obj_room_controller_snowdin_22_Step_0

(view raw script w/o annotations or w/e)
1
if (!audio_is_playing(mus_ambient_river))
2
    audio_play_sound(mus_ambient_river, 20, 1)
3
var martlet = obj_martlet_snowdin_22
4
var collider = obj_event_collider
5
with (collider)
6
{
7
    if trigger
8
    {
9
        if (global.snowdin_flag[13] == 1)
10
            other.scene = 0
11
        else
12
        {
13
            obj_flowey_snowdin_22.scene = 1
14
            instance_destroy()
15
        }
16
        global.snowdin_flag[14] = 2
17
        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 }
()
18
        audio_sound_gain(obj_radio.current_song, 0, 500)
19
        instance_destroy()
20
    }
21
}
22
if (scene == -1)
23
    return;
24
switch scene
25
{
26
    case 0:
27
        scr_camera_move
scr_camera_move

function scr_camera_move(argument0, argument1, argument2) //gml_Script_scr_camera_move { if (!instance_exists(obj_camera)) { instance_create(__view_get((9 << 0), 0).x, __view_get((9 << 0), 0).y, obj_camera) __view_set((9 << 0), 0, 1120) } else { obj_camera.x = __view_get((9 << 0), 0).x obj_camera.y = __view_get((9 << 0), 0).y __view_set((9 << 0), 0, 1120) } obj_camera.move = true obj_camera.xx = argument0 obj_camera.yy = argument1 obj_camera.spd = argument2 if (abs(argument0 - obj_camera.x) <= argument2 && abs(argument1 - obj_camera.y) <= argument2) return true; else return false; }
(380, 120, 2)
28
        timer = 45
29
        scene++
30
        break
31
    case 1:
32
        if (timer > 0)
33
            timer--
34
        else
35
        {
36
            timer = -1
37
            scene = 2
38
        }
39
        break
40
    case 2:
41
        scr_text
scr_text

function scr_text() //gml_Script_scr_text { if (!instance_exists(obj_dialogue)) msg = instance_create(x, y, obj_dialogue) }
()
42
        with (martlet)
43
            is_talking = true
44
        with (msg)
45
        {
46
            sndfnt = 102
47
            message[0] = "* Hey there, so here's#  the plan!"
48
            message[1] = "* I'm sorry, I think that#  I went a little#  overboard but..."
49
            message[2] = "* I can't help it! This#  is all too exciting!"
50
            message[3] = "* So, I've been saving#  this for a rainy day."
51
            message[4] = "* Ya know, figuratively...#  We don't really have#  those..."
52
            message[5] = "* Either way! Behold! The#  UG Aviator!"
53
            prt[0] = 328
54
            prt[1] = 320
55
            prt[2] = 318
56
            prt[3] = 328
57
            prt[4] = 311
58
            prt[5] = 312
59
        }
60
        scene = 3
61
        break
62
    case 3:
63
        if (!instance_exists(obj_dialogue))
64
            scene = 4
65
        break
66
    case 4:
67
        if cutscene_npc_walk(1545, 440, obj_martlet_snowdin_22.y, 3, "x", "down", false)
68
        {
69
            scene = 5
70
            timer = 15
71
        }
72
        break
73
    case 5:
74
        if (timer > 0)
75
            timer--
76
        else
77
        {
78
            timer = -1
79
            scene++
80
        }
81
        break
82
    case 6:
83
        scr_text
scr_text

function scr_text() //gml_Script_scr_text { if (!instance_exists(obj_dialogue)) msg = instance_create(x, y, obj_dialogue) }
()
84
        with (msg)
85
        {
86
            portrait = false
87
            message[0] = "* (In the water sits an#  old-looking raft with just#  enough room for two passengers.)"
88
            message[1] = "* Isn't she a beauty?#* Boats are shes, ya know."
89
            message[2] = "* I call her Ava for#  short! Isn't that cute?"
90
            prt[0] = 0
91
            prt[1] = 318
92
            prt[2] = 312
93
            if (message_current > 0)
94
            {
95
                portrait = true
96
                sndfnt = 102
97
                with (martlet)
98
                    is_talking = true
99
                other.scene++
100
            }
101
        }
102
        break
103
    case 7:
104
        if (!instance_exists(obj_dialogue))
105
            scene = 8
106
        break
107
    case 8:
108
        if scr_camera_move
scr_camera_move

function scr_camera_move(argument0, argument1, argument2) //gml_Script_scr_camera_move { if (!instance_exists(obj_camera)) { instance_create(__view_get((9 << 0), 0).x, __view_get((9 << 0), 0).y, obj_camera) __view_set((9 << 0), 0, 1120) } else { obj_camera.x = __view_get((9 << 0), 0).x obj_camera.y = __view_get((9 << 0), 0).y __view_set((9 << 0), 0, 1120) } obj_camera.move = true obj_camera.xx = argument0 obj_camera.yy = argument1 obj_camera.spd = argument2 if (abs(argument0 - obj_camera.x) <= argument2 && abs(argument1 - obj_camera.y) <= argument2) return true; else return false; }
(obj_pl.x, obj_pl.y, 2)
109
        {
110
            __view_set((9 << 0), 0, 1031)
111
            timer = 5
112
            scene++
113
        }
114
        break
115
    case 9:
116
        if (timer > 0)
117
            timer--
118
        else
119
        {
120
            timer = -1
121
            scr_radio_restart
scr_radio_restart

function scr_radio_restart() //gml_Script_scr_radio_restart { with (obj_radio) event_user(0) }
()
122
            scr_cutscene_end
scr_cutscene_end

function scr_cutscene_end() //gml_Script_scr_cutscene_end { global.cutscene = false obj_pl.alarm[0] = 1 }
()
123
            scene = 10
124
        }
125
        break
126
    case 11:
127
        with (obj_npc_clover_snowdin_22)
128
        {
129
            can_walk = true
130
            x_dest[0] = x
131
            y_dest[0] = 140
132
            x_dest[1] = 330
133
            y_dest[1] = 70
134
        }
135
        obj_martlet_snowdin_22.alarm[0] = 45
136
        scene++
137
        break
138
}