Undertale Yellow script viewer

← back to main script listing

gml_Object_obj_dunes_29b_controller_neutral_Step_0

(view raw script w/o annotations or w/e)
1
switch (scene)
2
{
3
    case 0:
4
        if (obj_pl.x > 300)
5
        {
6
            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; }
();
7
            audio_sound_gain(obj_radio.current_song, 0, 360);
8
            flowey = instance_create(360, obj_pl.y, obj_dunes_32_flowey);
9
            timer = 40;
10
            scene++;
11
        }
12
        break;
13
    case 1:
14
        if (!scr_timer
scr_timer

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

function scr_text() { if (!instance_exists(obj_dialogue)) msg = instance_create(x, y, obj_dialogue); }
();
17
        with (msg)
18
        {
19
            sndfnt = 96;
20
            message[0] = "* Howdy!\t";
21
            message[1] = "* Gee, looks like we're#  getting close to an exit#  from this place.\t";
22
            message[2] = "* Aside from those mines,#  time has been pretty#  friendly to us.\t";
23
            message[3] = "* Should be a simple#  journey from here on ou-";
24
            prt[0] = 348;
25
            prt[1] = 347;
26
            prt[2] = 348;
27
            prt[3] = 348;
28
            message[4] = "* Hey! Human!";
29
            talker[0] = other.flowey;
30
            position = 1;
31
            if (message_current == 3)
32
            {
33
                skippable = false;
34
                if (cutoff >= string_length(message[message_current]))
35
                {
36
                    other.scene++;
37
                    other.timer = 60;
38
                    other.flowey.is_talking = false;
39
                    sndfnt = 102;
40
                    portrait = false;
41
                    message_current += 1;
42
                    cutoff = 0;
43
                }
44
            }
45
        }
46
        break;
47
    case 2:
48
        if (scr_timer
scr_timer

function scr_timer() { if (timer > 0) { timer--; return false; } else { return true; } }
())
49
        {
50
            scene++;
51
            timer = 15;
52
            instance_destroy(msg);
53
        }
54
        break;
55
    case 3:
56
        if (!scr_timer
scr_timer

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

function scr_text() { if (!instance_exists(obj_dialogue)) msg = instance_create(x, y, obj_dialogue); }
();
59
        with (msg)
60
        {
61
            sndfnt = 96;
62
            message[0] = "* Really?";
63
            prt[0] = 351;
64
            talker[0] = other.flowey;
65
            position = 1;
66
        }
67
        if (!global.dialogue_open)
68
            scene++;
69
        break;
70
    case 4:
71
        with (flowey)
72
        {
73
            sprite_index = spr_floweyleave;
74
            image_speed = 0.2;
75
        }
76
        timer = 20;
77
        scene++;
78
        break;
79
    case 5:
80
        if (!scr_timer
scr_timer

function scr_timer() { if (timer > 0) { timer--; return false; } else { return true; } }
())
81
            exit;
82
        if (!instance_exists(obj_martlet_dunes_32))
83
        {
84
            martlet = instance_create(__view_get(e__VW.XView, 0) + 320 + 40, obj_pl.y, obj_martlet_dunes_32);
85
            audio_play_sound(mus_birdsofafeather, 1, 1);
86
        }
87
        if (martlet.npc_arrived)
88
        {
89
            martlet.npc_arrived = false;
90
            scene++;
91
        }
92
        break;
93
    case 6:
94
        scr_text
scr_text

function scr_text() { if (!instance_exists(obj_dialogue)) msg = instance_create(x, y, obj_dialogue); }
();
95
        with (msg)
96
        {
97
            ch_msg = 10;
98
            ch[1] = "It's Clover";
99
            sndfnt = 102;
100
            talker[0] = other.martlet;
101
            message[0] = "* Don't attack me, I can#  explain why I'm here!";
102
            message[1] = "* I said I would find you#  again, didn't I?";
103
            message[2] = "* Well, after our#  encounter, I spotted you#  stealing Ava... My raft.";
104
            message[3] = "* BUT, I won't hold it#  against you.";
105
            message[4] = "* I'm sure you didn't#  mean to wreck her.";
106
            message[5] = "* I attacked you, you#  destroyed something I#  love, even steven!";
107
            message[6] = "* Anyway, I followed the#  river and ended up here.";
108
            message[7] = "* I know I came off as a#  murderous Royal Guard#  but I'm honestly not!";
109
            message[8] = "* I have to follow my#  guidebook when dealing#  with humans and stuff...";
110
            message[9] = "* Oh! Right! I really#  dislike calling you#  \"human\".";
111
            message[10] = "* What's your actual#  name?";
112
            message[11] = "* What a unique name! I#  love it!";
113
            prt[0] = 322;
114
            prt[1] = 323;
115
            prt[2] = 338;
116
            prt[3] = 321;
117
            prt[4] = 321;
118
            prt[5] = 328;
119
            prt[6] = 321;
120
            prt[7] = 323;
121
            prt[8] = 320;
122
            prt[9] = 333;
123
            prt[10] = 328;
124
            prt[11] = 312;
125
            position = 1;
126
        }
127
        if (!global.dialogue_open)
128
            scene++;
129
        break;
130
    case 7:
131
        scr_text
scr_text

function scr_text() { if (!instance_exists(obj_dialogue)) msg = instance_create(x, y, obj_dialogue); }
();
132
        with (msg)
133
        {
134
            ch_msg = 4;
135
            ch[1] = "Okay";
136
            ch[2] = "Uh...";
137
            sndfnt = 102;
138
            talker[0] = other.martlet;
139
            message[0] = "* So, Clover, this is a#  big favor, but I would#  like to help you.";
140
            message[1] = "* I kinda let you escape#  in Snowdin so... I'm in#  too deep.";
141
            message[2] = "* I'm sure I could pull#  my weight! I'll even let#  you lead! ";
142
            message[3] = "* I won't leave your side#  to ensure your safety!";
143
            message[4] = "* Please?";
144
            prt[0] = 329;
145
            prt[1] = 323;
146
            prt[2] = 320;
147
            prt[3] = 328;
148
            prt[4] = 323;
149
            position = 1;
150
            if (outcome == 1)
151
            {
152
                message[5] = "* Yes!";
153
                prt[5] = 312;
154
            }
155
            if (outcome == 2)
156
            {
157
                message[5] = "* I'll take that as a#  yes!";
158
                prt[5] = 328;
159
            }
160
            message[6] = "* This will be super fun!";
161
            message[7] = "* So... shall we be off?";
162
            prt[6] = 312;
163
            prt[7] = 318;
164
        }
165
        if (!global.dialogue_open)
166
            scene++;
167
        break;
168
    case 8:
169
        with (martlet)
170
        {
171
            x_dest[0] = obj_pl.x - 20;
172
            y_dest[0] = obj_pl.y;
173
            end_direction = "right";
174
            can_walk = true;
175
            if (npc_arrived)
176
                other.scene++;
177
        }
178
        break;
179
    case 9:
180
        with (instance_create(martlet.x, martlet.y, obj_martlet_follower))
181
            npc_reset = true;
182
        global.party_member = 1170;
183
        instance_destroy(martlet);
184
        audio_sound_gain(mus_birdsofafeather, 0, 200);
185
        audio_sound_gain(obj_radio.current_song, 1, 800);
186
        scene++;
187
        break;
188
    case 10:
189
        instance_destroy();
190
        global.dunes_flag[16] = 1;
191
        scr_cutscene_end
scr_cutscene_end

function scr_cutscene_end() { global.cutscene = false; obj_pl.alarm[0] = 1; }
();
192
        break;
193
}
194
195
enum e__VW
196
{
197
    XView,
198
    YView,
199
    WView,
200
    HView,
201
    Angle,
202
    HBorder,
203
    VBorder,
204
    HSpeed,
205
    VSpeed,
206
    Object,
207
    Visible,
208
    XPort,
209
    YPort,
210
    WPort,
211
    HPort,
212
    Camera,
213
    SurfaceID
214
}