Undertale Yellow script viewer

← back to main script listing

gml_Object_obj_red_dunes_30_Step_0

(view raw script w/o annotations or w/e)
1
event_inherited()
2
if interact
3
{
4
    if (global.party_member != -4)
5
    {
6
        if (npc_flag < 3)
7
        {
8
            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 }
()
9
            scene = 1
10
            return;
11
        }
12
    }
13
    scr_text
scr_text

function scr_text() //gml_Script_scr_text { if (!instance_exists(obj_dialogue)) msg = instance_create(x, y, obj_dialogue) }
()
14
    is_talking = true
15
    switch npc_flag
16
    {
17
        case 0:
18
            with (msg)
19
            {
20
                portrait = false
21
                sndfnt = 99
22
                message[0] = "* WHOA!"
23
                message[1] = "* Whoa whoa WHOA!"
24
                message[2] = "* How many times are you gonna#  bring me in? I TOLD you I'm not#  a—"
25
                message[3] = "* Oh, you're... not a member#  of the guard."
26
                message[4] = "* Gah! I'm really really sorry!"
27
                message[5] = "* I've been mistaken for a human#  a few too many times."
28
                message[6] = "* Some of 'em even recognize me#  now. Maybe I should get to know#  them better..."
29
            }
30
            npc_flag = 1
31
            break
32
        case 1:
33
            with (msg)
34
            {
35
                portrait = false
36
                sndfnt = 99
37
                message[0] = "* You kinda look like the same#  might've happened to you."
38
                message[1] = "* Dressing the way a human#  wouldn't is a good start,"
39
                message[2] = "* but a lot of folks down here#  don't know the nuances of#  ~human fashion~."
40
                message[3] = "* Maybe put on like, two or three#  more hats."
41
                message[4] = "* Put hats on your feet too.#  Nobody will bother you then."
42
            }
43
            npc_flag = 2
44
            break
45
        case 2:
46
            with (msg)
47
            {
48
                portrait = false
49
                sndfnt = 99
50
                message[0] = "* So, do you just walk up to#  people repeatedly and expect#  them to talk to you?"
51
                message[1] = "* ...Does it work?"
52
                message[2] = "* ...Should I try it?"
53
            }
54
            break
55
        case 3:
56
            if (global.party_member != -4)
57
            {
58
                is_talking = false
59
                with (msg)
60
                {
61
                    message[0] = "* (Red stares awkwardly.)"
62
                    message[1] = "* (She isn't prepared for a#  second conversation.)"
63
                }
64
            }
65
            else
66
            {
67
                with (msg)
68
                {
69
                    message[0] = "* Hopefully Martlet didn't give#  you too much trouble!"
70
                    message[1] = "* Not that she would."
71
                    message[2] = "* If you want a Guard to mistake#  you for a human, she's#  definitely the best one."
72
                }
73
                npc_flag = 4
74
            }
75
            break
76
        case 4:
77
            with (msg)
78
            {
79
                message[0] = "* ...Wait, did you get arrested#  on PURPOSE to try and make new#  friends?"
80
                message[1] = "* ...."
81
                message[2] = "* ..................."
82
                message[3] = "* ...You might be onto something,#  buster."
83
            }
84
            npc_flag = 5
85
            break
86
        case 5:
87
            is_talking = false
88
            with (msg)
89
                message[0] = "* (Red is in deep thought.)"
90
            break
91
    }
92
93
}
94
switch scene
95
{
96
    case 1:
97
        with (obj_martlet_follower)
98
        {
99
            image_alpha = 0
100
            other.martlet_npc = instance_create(x, y, obj_martlet_npc)
101
        }
102
        with (obj_pl)
103
            other.player_npc = instance_create(x, y, obj_player_npc)
104
        with (martlet_npc)
105
        {
106
            x_dest[0] = other.x - 20
107
            y_dest[0] = other.y + 35
108
            end_direction = "up"
109
            can_walk = true
110
        }
111
        with (player_npc)
112
        {
113
            x_dest[0] = other.x + 20
114
            y_dest[0] = other.y + 35
115
            end_direction = "up"
116
            can_walk = true
117
        }
118
        scene++
119
        break
120
    case 2:
121
        if (player_npc.npc_arrived && martlet_npc.npc_arrived)
122
        {
123
            player_npc.npc_arrived = false
124
            martlet_npc.npc_arrived = false
125
            timer = 30
126
            scene++
127
        }
128
        break
129
    case 3:
130
        if (!scr_timer
scr_timer

function scr_timer() //gml_Script_scr_timer { if (timer > 0) { timer-- return false; } else return true; }
())
131
            return;
132
        var martlet = martlet_npc
133
        var red = id
134
        scr_text
scr_text

function scr_text() //gml_Script_scr_text { if (!instance_exists(obj_dialogue)) msg = instance_create(x, y, obj_dialogue) }
()
135
        with (msg)
136
        {
137
            if (talker[message_current] == red)
138
                sndfnt = 99
139
            if (talker[message_current] == martlet || message_current == 0)
140
                sndfnt = 102
141
            talker[0] = martlet
142
            message[0] = "* Ooooh! Oh, hey! Clover!"
143
            message[1] = "* Remember how I told you#  I apprehended a human#  last week?"
144
            message[2] = "* Thaaat's her!"
145
            prt[0] = 328
146
            prt[1] = 328
147
            prt[2] = 318
148
            talker[3] = red
149
            message[3] = "* ?"
150
            message[4] = "* ????????????"
151
            message[5] = "* You STILL think I'm... your#  captain DID explain to you I'm#  not a human, right?"
152
            message[6] = "* Please tell me she did."
153
            talker[7] = martlet
154
            message[7] = "* Oh! I'm so sorry! I just#  thought you-"
155
            prt[7] = 333
156
            talker[8] = red
157
            message[8] = "* No, no, I'm sorry, I just...#  get it often."
158
            message[9] = "* You MAY OR MAY NOT be the first#  that apprehended me repeatedly,#  though."
159
            message[10] = "* Kinda put me on edge."
160
            talker[9] = martlet
161
            message[9] = "* It's totally fine!"
162
            message[10] = "* You wouldn't believe#  how many grumpy#  monsters I deal with."
163
            message[11] = "* N-not that you're a#  grumpy monster!"
164
            message[12] = "* I'm sure you're very#  nice!"
165
            message[13] = "* Ahem. Anyway..."
166
            message[14] = "* What's your name?"
167
            ch_msg = 14
168
            ch[1] = "It's Clover"
169
            message[15] = "* Huh? No, not you, silly,#  her!"
170
            prt[9] = 318
171
            prt[10] = 328
172
            prt[11] = 333
173
            prt[12] = 323
174
            prt[13] = 335
175
            prt[14] = 320
176
            prt[15] = 333
177
            talker[16] = red
178
            message[16] = "* I.... Actually, how about#  \"Red?\""
179
            message[17] = "* That's what your colleagues#  have kept calling me every time#  I get falsely apprehended."
180
            message[18] = "* To be honest..."
181
            message[19] = "* I hoped that eventually I'd be#  \"caught\" enough that you'd all#  recognize me and it'd stop."
182
            message[20] = "* It might just be wiser to JOIN#  the Guard at this point..."
183
            talker[21] = martlet
184
            message[21] = "* Join?"
185
            message[22] = "* That would be fantastic!"
186
            message[23] = "* I'd be glad to show you#  the ropes of my job!"
187
            message[24] = "* You could even help me#  build puzzles!"
188
            message[25] = "* That might be a code#  violation now that I#  think about it..."
189
            message[26] = "* Aaahh, it's fine!"
190
            prt[21] = 333
191
            prt[22] = 318
192
            prt[23] = 318
193
            prt[24] = 313
194
            prt[25] = 335
195
            prt[26] = 313
196
            talker[27] = red
197
            message[27] = "* What?"
198
            message[28] = "* It can't be THAT easy to get in,#  right?"
199
            talker[29] = martlet
200
            message[29] = "* I mean, they let me#  join."
201
            message[30] = "* We'll figure it out!"
202
            message[31] = "* Me and Clover have some#  important business to#  attend to."
203
            message[32] = "* But I should be free#  next week!"
204
            message[33] = "* You can find me doing#  my duty around Snowdin#  any day."
205
            prt[29] = 337
206
            prt[30] = 313
207
            prt[31] = 338
208
            prt[32] = 328
209
            prt[33] = 328
210
            talker[34] = red
211
            message[34] = "* Oh."
212
            message[35] = "* You're serious."
213
            message[36] = "* Ah, ahahaha, I mean, haha,#  s-sure?"
214
            message[37] = "* S-sounds like a plan!!"
215
            message[38] = "* See you then!!"
216
            talker[39] = martlet
217
            message[39] = "* See ya!"
218
            prt[39] = 312
219
        }
220
        if (!global.dialogue_open)
221
        {
222
            scene++
223
            obj_pl.image_alpha = 1
224
            obj_pl.direction = 90
225
            with (obj_martlet_follower)
226
            {
227
                x = other.martlet_npc.x
228
                y = other.martlet_npc.y
229
                npc_reset = true
230
                dir_new[1] = 90
231
                image_alpha = 1
232
            }
233
            instance_destroy(martlet_npc)
234
            instance_destroy(player_npc)
235
            return;
236
        }
237
        break
238
    case 4:
239
        scene = 0
240
        npc_flag = 3
241
        scr_cutscene_end
scr_cutscene_end

function scr_cutscene_end() //gml_Script_scr_cutscene_end { global.cutscene = false obj_pl.alarm[0] = 1 }
()
242
        break
243
}