Undertale Yellow script viewer

← back to main script listing

gml_Object_obj_steamworks_13_controller_old_Step_0

(view raw script w/o annotations or w/e)
1
var item_1_xx = 88;
2
var item_1_yy = 160;
3
var item_2_xx = 128;
4
var item_2_yy = 160;
5
var item_3_xx = 88;
6
var item_3_yy = 190;
7
var item_4_xx = 128;
8
var item_4_yy = 190;
9
switch (scene)
10
{
11
    case 0:
12
        cutscene_wait(2);
13
        break;
14
    case 1:
15
        cutscene_dialogue();
16
        with (msg)
17
        {
18
            ch_msg = 15;
19
            ch[1] = "Yes";
20
            ch[2] = "No";
21
            talker[0] = 1161;
22
            message[0] = "* Ouch... Can't say I was#  prepared for that.";
23
            message[1] = "* I knew my husband was#  an engineer but he never#  told me about that guy.";
24
            message[2] = "* He'd vaguely mention a#  robotics project that#  could net him a#  promotion but...";
25
            message[3] = "* He stopped talking#  about it after he quit#  his job here.";
26
            message[4] = "* Ugh...";
27
            message[5] = "* I would've used force#  to bypass \"Axis\" but I...#  I'm not sure now.";
28
            message[6] = "* He may be the last#  remnant of Chujin's#  talent.";
29
            message[7] = "* It would be best if we#  could just avoid him#  from now on...";
30
            message[8] = "* ...";
31
            message[9] = "* In any case, I guess#  we're pretty lucky he's#  the only guard bot#  around.";
32
            message[10] = "* Wait a second...";
33
            message[11] = "* I have an idea!";
34
            message[12] = "* He mentioned how he was#  \"lonely\" right? Well#  what if we fixed that?";
35
            message[13] = "* We could use scraps#  lying around to forge a#  companion for him!";
36
            message[14] = "* He doesn't seem too#  bright after all. Maybe#  that's all we need to#  distract him?";
37
            message[15] = "* What do you think?";
38
            prt[0] = 370;
39
            prt[1] = 370;
40
            prt[2] = 370;
41
            prt[3] = 370;
42
            prt[4] = 370;
43
            prt[5] = 370;
44
            prt[6] = 370;
45
            prt[7] = 370;
46
            prt[8] = 370;
47
            prt[9] = 370;
48
            prt[10] = 370;
49
            prt[11] = 370;
50
            prt[12] = 370;
51
            prt[13] = 370;
52
            prt[14] = 370;
53
            prt[15] = 370;
54
            if (outcome == 1)
55
            {
56
                message[16] = "* Great!";
57
                message[17] = "* It's the best plan I#  could think of.";
58
                prt[16] = 370;
59
                prt[17] = 370;
60
            }
61
            if (outcome == 2)
62
            {
63
                message[16] = "* You got a better idea?";
64
                message[17] = "* It'll be easy, trust#  me.";
65
                prt[16] = 370;
66
                prt[17] = 370;
67
            }
68
        }
69
        break;
70
    case 2:
71
        cutscene_dialogue();
72
        with (msg)
73
        {
74
            talker[0] = 1161;
75
            message[0] = "* So... ";
76
            message[1] = "* We seem to be in some#  sort of storage room.";
77
            message[2] = "* Look around for parts#  we can use. Shouldn't#  take many.";
78
            prt[0] = 370;
79
            prt[1] = 370;
80
            prt[2] = 370;
81
        }
82
        break;
83
    case 3:
84
        cutscene_npc_walk(1161, 105, 125, 3, "x", "down");
85
        break;
86
    case 4:
87
        scr_cutscene_end
scr_cutscene_end

function scr_cutscene_end() { global.cutscene = false; obj_pl.alarm[0] = 1; }
();
88
        cutscene_advance();
89
        break;
90
    case 5:
91
        var player_carrying_item = false;
92
        with (obj_robuild_parent)
93
        {
94
            if (robot_item_is_carried == true)
95
                player_carrying_item = true;
96
        }
97
        if (player_carrying_item && point_in_rectangle(obj_pl.x, obj_pl.y, 50, 120, 180, 200))
98
        {
99
            scr_text
scr_text

function scr_text() { if (!instance_exists(obj_dialogue)) msg = instance_create(x, y, obj_dialogue); }
();
100
            with (msg)
101
            {
102
                talker[0] = 1161;
103
                message[0] = "* You want to use this?";
104
                prt[0] = 370;
105
                ch_msg = 0;
106
                ch[1] = "Positive";
107
                ch[2] = "Negative";
108
                if (outcome == 1)
109
                {
110
                    global.cutscene = true;
111
                    with (obj_robuild_parent)
112
                    {
113
                        if (robot_item_is_carried == true)
114
                        {
115
                            robot_item_is_jumping = true;
116
                            robot_item_x_target = item_1_xx;
117
                            robot_item_y_target = item_1_yy;
118
                            audio_play_sound(snd_playerjump, 1, 0);
119
                            obj_steamworks_13_controller.robot_part[0] = editor_sprite;
120
                        }
121
                    }
122
                    other.scene++;
123
                }
124
                if (outcome == 2)
125
                {
126
                    message[1] = "* Grab something else#  then.";
127
                    prt[1] = 370;
128
                }
129
            }
130
        }
131
        break;
132
    case 6:
133
        with (obj_robuild_parent)
134
        {
135
            if (robot_item_is_carried)
136
                exit;
137
        }
138
        cutscene_dialogue();
139
        with (msg)
140
        {
141
            talker[0] = 1161;
142
            message[0] = "* Okay, we'll need three#  more objects.";
143
            prt[0] = 370;
144
        }
145
        global.cutscene = false;
146
        break;
147
    case 7:
148
        var player_carrying_item = false;
149
        with (obj_robuild_parent)
150
        {
151
            if (robot_item_is_carried == true)
152
                player_carrying_item = true;
153
        }
154
        if (player_carrying_item && point_in_rectangle(obj_pl.x, obj_pl.y, 50, 120, 180, 200))
155
        {
156
            scr_text
scr_text

function scr_text() { if (!instance_exists(obj_dialogue)) msg = instance_create(x, y, obj_dialogue); }
();
157
            with (msg)
158
            {
159
                talker[0] = 1161;
160
                message[0] = "* You think this'll work?";
161
                prt[0] = 370;
162
                ch_msg = 0;
163
                ch[1] = "Certain";
164
                ch[2] = "Uncertain";
165
                if (outcome == 1)
166
                {
167
                    global.cutscene = true;
168
                    with (obj_robuild_parent)
169
                    {
170
                        if (robot_item_is_carried == true)
171
                        {
172
                            robot_item_is_jumping = true;
173
                            robot_item_x_target = item_2_xx;
174
                            robot_item_y_target = item_2_yy;
175
                            audio_play_sound(snd_playerjump, 1, 0);
176
                            obj_steamworks_13_controller.robot_part[1] = editor_sprite;
177
                        }
178
                    }
179
                    other.scene++;
180
                }
181
                if (outcome == 2)
182
                {
183
                    message[1] = "* We don't have time to waste.";
184
                    prt[1] = 370;
185
                }
186
            }
187
        }
188
        break;
189
    case 8:
190
        with (obj_robuild_parent)
191
        {
192
            if (robot_item_is_carried)
193
                exit;
194
        }
195
        cutscene_dialogue();
196
        with (msg)
197
        {
198
            talker[0] = 1161;
199
            message[0] = "* Alright, two more and#  we can make this thing.";
200
            prt[0] = 437;
201
        }
202
        global.cutscene = false;
203
        break;
204
    case 9:
205
        var player_carrying_item = false;
206
        with (obj_robuild_parent)
207
        {
208
            if (robot_item_is_carried == true)
209
                player_carrying_item = true;
210
        }
211
        if (player_carrying_item && point_in_rectangle(obj_pl.x, obj_pl.y, 50, 120, 180, 200))
212
        {
213
            scr_text
scr_text

function scr_text() { if (!instance_exists(obj_dialogue)) msg = instance_create(x, y, obj_dialogue); }
();
214
            with (msg)
215
            {
216
                talker[0] = 1161;
217
                message[0] = "* Is this a good pick?";
218
                prt[0] = 370;
219
                ch_msg = 0;
220
                ch[1] = "Definitely";
221
                ch[2] = "Definitely\nnot";
222
                if (outcome == 1)
223
                {
224
                    global.cutscene = true;
225
                    with (obj_robuild_parent)
226
                    {
227
                        if (robot_item_is_carried == true)
228
                        {
229
                            robot_item_is_jumping = true;
230
                            robot_item_x_target = item_3_xx;
231
                            robot_item_y_target = item_3_yy;
232
                            audio_play_sound(snd_playerjump, 1, 0);
233
                            obj_steamworks_13_controller.robot_part[2] = editor_sprite;
234
                        }
235
                    }
236
                    other.scene++;
237
                }
238
                if (outcome == 2)
239
                {
240
                    message[1] = "* Make up your mind.";
241
                    prt[1] = 370;
242
                }
243
            }
244
        }
245
        break;
246
    case 10:
247
        with (obj_robuild_parent)
248
        {
249
            if (robot_item_is_carried)
250
                exit;
251
        }
252
        cutscene_dialogue();
253
        with (msg)
254
        {
255
            talker[0] = 1161;
256
            message[0] = "* One more object should#  do the trick.";
257
            prt[0] = 370;
258
        }
259
        global.cutscene = false;
260
        break;
261
    case 11:
262
        var player_carrying_item = false;
263
        with (obj_robuild_parent)
264
        {
265
            if (robot_item_is_carried == true)
266
                player_carrying_item = true;
267
        }
268
        if (player_carrying_item && point_in_rectangle(obj_pl.x, obj_pl.y, 50, 120, 180, 200))
269
        {
270
            scr_text
scr_text

function scr_text() { if (!instance_exists(obj_dialogue)) msg = instance_create(x, y, obj_dialogue); }
();
271
            with (msg)
272
            {
273
                talker[0] = 1161;
274
                message[0] = "* Is this your final#  choice?";
275
                prt[0] = 370;
276
                ch_msg = 0;
277
                ch[1] = "Yea";
278
                ch[2] = "Nay";
279
                if (outcome == 1)
280
                {
281
                    global.cutscene = true;
282
                    with (obj_robuild_parent)
283
                    {
284
                        if (robot_item_is_carried == true)
285
                        {
286
                            robot_item_is_jumping = true;
287
                            robot_item_x_target = item_4_xx;
288
                            robot_item_y_target = item_4_yy;
289
                            audio_play_sound(snd_playerjump, 1, 0);
290
                            obj_steamworks_13_controller.robot_part[3] = editor_sprite;
291
                        }
292
                    }
293
                    scr_audio_fade_out
scr_audio_fade_out

function scr_audio_fade_out(arg0, arg1) { var snd = arg0; var fade_len = arg1; if (!audio_is_playing(snd)) return false; audio_sound_gain(snd, 0, fade_len); if (instance_exists(obj_audio_fade_helper)) { with (obj_audio_fade_helper) { if (audio_to_fade == snd) return false; } } with (instance_create(0, 0, obj_audio_fade_helper)) audio_to_fade = snd; }
(obj_radio.current_song, 0);
294
                    other.scene++;
295
                }
296
                if (outcome == 2)
297
                {
298
                    message[1] = "* Hurry it up then.";
299
                    prt[1] = 370;
300
                }
301
            }
302
        }
303
        break;
304
    case 12:
305
        with (obj_robuild_parent)
306
        {
307
            if (robot_item_is_carried)
308
                exit;
309
        }
310
        cutscene_dialogue();
311
        with (msg)
312
        {
313
            talker[0] = 1161;
314
            message[1] = "* Okay, let's build a#  robot!";
315
            prt[1] = 372;
316
        }
317
        break;
318
    case 13:
319
        cutscene_wait(2);
320
        break;
321
    case 14:
322
        if (global.dialogue_open)
323
            exit;
324
        if (!instance_exists(obj_robot_build_controller))
325
            instance_create(0, 0, obj_robot_build_controller);
326
        for (var i = 0; i < array_length_1d(robot_part); i++)
327
            obj_robot_build_controller.robot_item[i] = robot_part[i];
328
        break;
329
}