Undertale Yellow script viewer

← back to main script listing

gml_Object_obj_steamworks_38_elevator_old_Step_0

(view raw script w/o annotations or w/e)
1
if (live_call())
2
    return global.live_result;
3
if (global.sworks_flag[39] < 1)
4
{
5
    switch (scene)
6
    {
7
        case 0:
8
            cutscene_instance_create(160, 180, 1168);
9
            obj_player_npc.npc_direction = "up";
10
            obj_player_npc.image_alpha = 0;
11
            break;
12
        case 1:
13
            obj_player_npc.image_alpha += 0.2;
14
            if (obj_player_npc.image_alpha >= 1)
15
                scene++;
16
            break;
17
        case 2:
18
            cutscene_npc_walk(1168, 176, 132, 3, "y", "down");
19
            break;
20
        case 3:
21
            cutscene_instance_create(160, 180, 1161);
22
            obj_ceroba_npc.npc_direction = "up";
23
            obj_ceroba_npc.image_alpha = 0;
24
            break;
25
        case 4:
26
            obj_ceroba_npc.image_alpha += 0.2;
27
            if (obj_ceroba_npc.image_alpha >= 1)
28
                scene++;
29
            break;
30
        case 5:
31
            if (cutscene_npc_walk(1161, 148, 133, 3, "y", "right"))
32
            {
33
                scene = 5.5;
34
                obj_player_npc.npc_direction = "left";
35
            }
36
            break;
37
        case 5.5:
38
            if (cutscene_wait(1.5))
39
                scene = 6;
40
            break;
41
        case 6:
42
            obj_steamworks_38_elevator_face.sprite_index = spr_steamworks_38_face_hello;
43
            obj_steamworks_38_elevator_face.image_speed = 1;
44
            scene++;
45
            break;
46
        case 7:
47
            if (obj_steamworks_38_elevator_face.sprite_index == spr_steamworks_38_face_hello && obj_steamworks_38_elevator_face.image_index < (obj_steamworks_38_elevator_face.image_number - 1))
48
                exit;
49
            if (obj_steamworks_38_elevator_face.sprite_index != spr_steamworks_38_face_talking)
50
            {
51
                obj_steamworks_38_elevator_face.sprite_index = spr_steamworks_38_face_talking;
52
                obj_steamworks_38_elevator_face.image_index = 0;
53
            }
54
            cutscene_dialogue_special("swirl", 65280);
55
            with (msg)
56
            {
57
                message[0] = "* Heeello!!! I welcome you into#  my body!!!";
58
                message[1] = "* Where ever would you like to#  go??";
59
                position = 0;
60
            }
61
            obj_player_npc.npc_direction = "up";
62
            obj_ceroba_npc.npc_direction = "up";
63
            break;
64
        case 8:
65
            cutscene_dialogue();
66
            with (msg)
67
            {
68
                talker[0] = 1161;
69
                message[0] = "* Top floor.";
70
                prt[0] = 377;
71
                position = 0;
72
            }
73
            break;
74
        case 9:
75
            cutscene_dialogue_special("swirl", 65280);
76
            with (msg)
77
            {
78
                message[0] = "* Did you say: \"Basement?\"";
79
                position = 0;
80
            }
81
            break;
82
        case 10:
83
            cutscene_dialogue();
84
            with (msg)
85
            {
86
                talker[0] = 1161;
87
                message[0] = "* Get us to the roof! Out#  of here! Whatever!";
88
                prt[0] = 368;
89
                position = 0;
90
            }
91
            break;
92
        case 11:
93
            cutscene_wait(1.5);
94
            break;
95
        case 12:
96
            cutscene_dialogue_special("swirl", 65280);
97
            with (msg)
98
            {
99
                message[0] = "* I carry a negative opinion of#  you.";
100
                message[1] = "* Heading to: \"Out of here.\"";
101
                position = 0;
102
            }
103
            break;
104
        case 13:
105
            cutscene_wait(0.5);
106
            break;
107
        case 14:
108
            obj_steamworks_38_elevator_face.sprite_index = spr_steamworks_38_face_loading;
109
            obj_steamworks_38_elevator_face.image_speed = 1;
110
            audio_play_sound(snd_ring, 1, 0);
111
            cutscene_advance();
112
            break;
113
        case 15:
114
            if (door_closed_amount < 1)
115
                door_closed_amount += 0.05;
116
            else
117
                cutscene_sfx_play(13, 1);
118
            break;
119
        case 16:
120
            cutscene_wait(1);
121
            break;
122
        case 17:
123
            obj_steamworks_38_elevator_face.sprite_index = spr_steamworks_38_face_up;
124
            if (global.last_room_overworld == "rm_steamworks_32")
125
                obj_steamworks_38_elevator_face.sprite_index = spr_steamworks_38_face_down;
126
            obj_steamworks_38_elevator_face.image_speed = 1;
127
            cutscene_advance();
128
            break;
129
        case 18:
130
            cutscene_sfx_play(271, 1);
131
            audio_play_sound(snd_rumble, 1, 1);
132
            break;
133
        case 19:
134
            cutscene_npc_action_sprite(1168, 1109, 0.25, true, 0);
135
            scene = 19.5;
136
            break;
137
        case 19.5:
138
            if (cutscene_npc_walk(1161, 138, 133, 1, "x", "down"))
139
                scene = 19.7;
140
            break;
141
        case 19.7:
142
            if (cutscene_npc_action_sprite(1161, 72, 1, true, 0))
143
                scene = 20;
144
            break;
145
        case 20:
146
            cutscene_wait(1.5);
147
            break;
148
        case 21:
149
            cutscene_dialogue();
150
            with (msg)
151
            {
152
                talker[0] = 1161;
153
                ch_msg = 8;
154
                ch[1] = "The 5\nhumans...";
155
                ch[2] = "Personal\nmission";
156
                message[0] = "* Ugh, sorry for all the#  outbursts.";
157
                message[1] = "* All of this is...";
158
                message[2] = "* It's a lot to process.";
159
                message[3] = "* Bet you're pretty tired#  of learning about me#  so...";
160
                message[4] = "* ...What about you?";
161
                message[5] = "* You're not exactly a#  talker so I don't know#  much.";
162
                message[6] = "* Why are you here in the#  first place?";
163
                message[7] = "* Did you simply trip and#  fall into the#  Underground?";
164
                message[8] = "* I'm curious.";
165
                prt[0] = 394;
166
                prt[1] = 371;
167
                prt[2] = 394;
168
                prt[3] = 370;
169
                prt[4] = 372;
170
                prt[5] = 377;
171
                prt[6] = 370;
172
                prt[7] = 370;
173
                prt[8] = 370;
174
                message[9] = "* I see...";
175
                message[10] = "* You wanted to find out#  what happened to those#  kids.";
176
                message[11] = "* ...A noble mission.#  Takes guts.";
177
                message[12] = "* I'm... assuming you#  haven't found them yet,#  though.";
178
                message[13] = "* ...";
179
                prt[9] = 377;
180
                prt[10] = 394;
181
                prt[11] = 377;
182
                prt[12] = 394;
183
                prt[13] = 371;
184
            }
185
            break;
186
        case 22:
187
            obj_steamworks_38_elevator_face.sprite_index = spr_steamworks_38_face_talking;
188
            obj_steamworks_38_elevator_face.image_index = 0;
189
            obj_steamworks_38_elevator_face.image_speed = 0;
190
            audio_play_sound(snd_ring, 1, 0);
191
            audio_stop_sound(snd_rumble);
192
            cutscene_advance();
193
            break;
194
        case 23:
195
            cutscene_wait(1);
196
            break;
197
        case 24:
198
            obj_player_npc.sprite_index = spr_pl_run_left;
199
            obj_player_npc.image_index = 1;
200
            obj_player_npc.image_speed = 0;
201
            audio_play_sound(snd_playerjump, 1, 0);
202
            with (obj_player_npc)
203
                path_start(pt_small_jump, 4, path_action_stop, false);
204
            scene++;
205
            break;
206
        case 25:
207
            var check = false;
208
            with (obj_player_npc)
209
            {
210
                if (path_position >= 1)
211
                    check = true;
212
            }
213
            if (check)
214
                cutscene_npc_reset_sprite(1168, "up");
215
            break;
216
        case 26:
217
            cutscene_npc_reset_sprite(1161, "right");
218
            break;
219
        case 27:
220
            cutscene_npc_walk(1161, 148, 133, 2, "x", "up");
221
            break;
222
        case 28:
223
            cutscene_wait(0.75);
224
            break;
225
        case 29:
226
            cutscene_dialogue_special("swirl", 65280);
227
            with (msg)
228
            {
229
                message[0] = "* We have arrived at \"Out of#  here.\"";
230
                position = 0;
231
            }
232
            break;
233
        case 30:
234
            cutscene_sfx_play(572, 1);
235
            break;
236
        case 31:
237
            if (door_closed_amount > 0)
238
                door_closed_amount -= 0.05;
239
            else
240
                cutscene_advance();
241
            break;
242
        case 32:
243
            cutscene_wait(1);
244
            break;
245
        case 33:
246
            cutscene_dialogue();
247
            with (msg)
248
            {
249
                talker[0] = 1161;
250
                message[0] = "* Well uh... better get#  moving.";
251
                prt[0] = 371;
252
            }
253
            break;
254
        case 34:
255
            cutscene_npc_walk(1168, 160, 180, 3, "x", "down");
256
            break;
257
        case 35:
258
            obj_player_npc.image_alpha -= 0.2;
259
            if (obj_player_npc.image_alpha <= 0)
260
                scene++;
261
            break;
262
        case 36:
263
            cutscene_npc_walk(1161, 160, 180, 3, "x", "down");
264
            break;
265
        case 37:
266
            obj_ceroba_npc.image_alpha -= 0.2;
267
            if (obj_ceroba_npc.image_alpha <= 0)
268
                scene++;
269
            break;
270
        case 38:
271
            audio_stop_all();
272
            global.party_member = 1171;
273
            cutscene_change_room(202, 840, 280, 0.025);
274
            global.sworks_flag[39] = 1;
275
            break;
276
    }
277
    camera_set_view_pos(view_camera[0], 0, 0);
278
    camera_set_view_pos(view_camera[0], random_range(-screenshake_intensity, screenshake_intensity), random_range(screenshake_intensity, screenshake_intensity));
279
    if (scene > 18 && scene < 22)
280
    {
281
        if (screenshake_intensity < 1)
282
            screenshake_intensity += 0.05;
283
    }
284
    else if (screenshake_intensity > 0)
285
    {
286
        screenshake_intensity -= 0.15;
287
    }
288
}
289
else
290
{
291
    switch (scene)
292
    {
293
        case 0:
294
            cutscene_instance_create(160, 180, 1168);
295
            obj_player_npc.npc_direction = "up";
296
            obj_player_npc.image_alpha = 0;
297
            break;
298
        case 1:
299
            obj_player_npc.image_alpha += 0.2;
300
            if (obj_player_npc.image_alpha >= 1)
301
                scene++;
302
            break;
303
        case 2:
304
            cutscene_npc_walk(1168, 176, 132, 3, "y", "down");
305
            break;
306
        case 3:
307
            if (global.party_member == -4)
308
            {
309
                scene = 6;
310
                exit;
311
            }
312
            cutscene_instance_create(160, 180, 1161);
313
            obj_ceroba_npc.npc_direction = "up";
314
            obj_ceroba_npc.image_alpha = 0;
315
            break;
316
        case 4:
317
            obj_ceroba_npc.image_alpha += 0.2;
318
            if (obj_ceroba_npc.image_alpha >= 1)
319
                scene++;
320
            break;
321
        case 5:
322
            if (cutscene_npc_walk(1161, 148, 133, 3, "y", "down"))
323
                scene = 6;
324
            break;
325
        case 6:
326
            cutscene_wait(0.5);
327
            break;
328
        case 7:
329
            obj_steamworks_38_elevator_face.sprite_index = spr_steamworks_38_face_loading;
330
            obj_steamworks_38_elevator_face.image_speed = 1;
331
            audio_play_sound(snd_ring, 1, 0);
332
            cutscene_advance();
333
            break;
334
        case 8:
335
            if (door_closed_amount < 1)
336
                door_closed_amount += 0.05;
337
            else
338
                cutscene_sfx_play(13, 1);
339
            break;
340
        case 9:
341
            cutscene_wait(1);
342
            break;
343
        case 10:
344
            obj_steamworks_38_elevator_face.sprite_index = spr_steamworks_38_face_up;
345
            if (global.last_room_overworld == "rm_steamworks_32")
346
                obj_steamworks_38_elevator_face.sprite_index = spr_steamworks_38_face_down;
347
            obj_steamworks_38_elevator_face.image_speed = 1;
348
            cutscene_advance();
349
            break;
350
        case 11:
351
            cutscene_sfx_play(271, 1);
352
            break;
353
        case 12:
354
            cutscene_wait(3.7);
355
            break;
356
        case 13:
357
            obj_steamworks_38_elevator_face.sprite_index = spr_steamworks_38_face_hello;
358
            obj_steamworks_38_elevator_face.image_index = 0;
359
            obj_steamworks_38_elevator_face.image_speed = 1;
360
            cutscene_advance();
361
            break;
362
        case 14:
363
            cutscene_wait(1);
364
            break;
365
        case 15:
366
            cutscene_sfx_play(572, 1);
367
            break;
368
        case 16:
369
            if (door_closed_amount > 0)
370
                door_closed_amount -= 0.05;
371
            else
372
                cutscene_advance();
373
            break;
374
        case 17:
375
            cutscene_wait(1.5);
376
            break;
377
        case 18:
378
            cutscene_npc_walk(1168, 160, 180, 3, "x", "down");
379
            break;
380
        case 19:
381
            if (global.party_member != -4)
382
                cutscene_npc_walk(1161, 160, 180, 3, "x", "down");
383
            else
384
                cutscene_advance();
385
            break;
386
        case 20:
387
            audio_stop_all();
388
            if (global.last_room_overworld == "rm_steamworks_32")
389
                cutscene_change_room(240, 120, 380, 0.1);
390
            else
391
                cutscene_change_room(202, 840, 280, 0.1);
392
            break;
393
    }
394
    if (scene > 17)
395
    {
396
        if (obj_player_npc.y > 160 && obj_player_npc.image_alpha > 0)
397
            obj_player_npc.image_alpha -= 0.2;
398
        if (instance_exists(obj_ceroba_npc) && obj_ceroba_npc.y > 160 && obj_ceroba_npc.image_alpha > 0)
399
            obj_ceroba_npc.image_alpha -= 0.2;
400
    }
401
    camera_set_view_pos(view_camera[0], 0, 0);
402
    camera_set_view_pos(view_camera[0], random_range(-screenshake_intensity, screenshake_intensity), random_range(screenshake_intensity, screenshake_intensity));
403
    if (scene > 11 && scene < 13)
404
    {
405
        if (screenshake_intensity < 1)
406
            screenshake_intensity += 0.05;
407
    }
408
    else if (screenshake_intensity > 0)
409
    {
410
        screenshake_intensity -= 0.15;
411
    }
412
}