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, obj_player_npc)
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, obj_ceroba_npc)
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
                return;
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(snd_elevator_door_shut, 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(snd_elevator, 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(snd_sliding_door_open, 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
278
    camera_set_view_pos(view_camera[0], 0, 0)
279
    camera_set_view_pos(view_camera[0], random_range((-screenshake_intensity), screenshake_intensity), random_range(screenshake_intensity, screenshake_intensity))
280
    if (scene > 18 && scene < 22)
281
    {
282
        if (screenshake_intensity < 1)
283
            screenshake_intensity += 0.05
284
    }
285
    else if (screenshake_intensity > 0)
286
        screenshake_intensity -= 0.15
287
}
288
else
289
{
290
    switch scene
291
    {
292
        case 0:
293
            cutscene_instance_create(160, 180, obj_player_npc)
294
            obj_player_npc.npc_direction = "up"
295
            obj_player_npc.image_alpha = 0
296
            break
297
        case 1:
298
            obj_player_npc.image_alpha += 0.2
299
            if (obj_player_npc.image_alpha >= 1)
300
                scene++
301
            break
302
        case 2:
303
            cutscene_npc_walk(1168, 176, 132, 3, "y", "down")
304
            break
305
        case 3:
306
            if (global.party_member == -4)
307
            {
308
                scene = 6
309
                return;
310
            }
311
            cutscene_instance_create(160, 180, obj_ceroba_npc)
312
            obj_ceroba_npc.npc_direction = "up"
313
            obj_ceroba_npc.image_alpha = 0
314
            break
315
        case 4:
316
            obj_ceroba_npc.image_alpha += 0.2
317
            if (obj_ceroba_npc.image_alpha >= 1)
318
                scene++
319
            break
320
        case 5:
321
            if cutscene_npc_walk(1161, 148, 133, 3, "y", "down")
322
                scene = 6
323
            break
324
        case 6:
325
            cutscene_wait(0.5)
326
            break
327
        case 7:
328
            obj_steamworks_38_elevator_face.sprite_index = spr_steamworks_38_face_loading
329
            obj_steamworks_38_elevator_face.image_speed = 1
330
            audio_play_sound(snd_ring, 1, 0)
331
            cutscene_advance()
332
            break
333
        case 8:
334
            if (door_closed_amount < 1)
335
                door_closed_amount += 0.05
336
            else
337
                cutscene_sfx_play(snd_elevator_door_shut, 1)
338
            break
339
        case 9:
340
            cutscene_wait(1)
341
            break
342
        case 10:
343
            obj_steamworks_38_elevator_face.sprite_index = spr_steamworks_38_face_up
344
            if (global.last_room_overworld == "rm_steamworks_32")
345
                obj_steamworks_38_elevator_face.sprite_index = spr_steamworks_38_face_down
346
            obj_steamworks_38_elevator_face.image_speed = 1
347
            cutscene_advance()
348
            break
349
        case 11:
350
            cutscene_sfx_play(snd_elevator, 1)
351
            break
352
        case 12:
353
            cutscene_wait(3.7)
354
            break
355
        case 13:
356
            obj_steamworks_38_elevator_face.sprite_index = spr_steamworks_38_face_hello
357
            obj_steamworks_38_elevator_face.image_index = 0
358
            obj_steamworks_38_elevator_face.image_speed = 1
359
            cutscene_advance()
360
            break
361
        case 14:
362
            cutscene_wait(1)
363
            break
364
        case 15:
365
            cutscene_sfx_play(snd_sliding_door_open, 1)
366
            break
367
        case 16:
368
            if (door_closed_amount > 0)
369
                door_closed_amount -= 0.05
370
            else
371
                cutscene_advance()
372
            break
373
        case 17:
374
            cutscene_wait(1.5)
375
            break
376
        case 18:
377
            cutscene_npc_walk(1168, 160, 180, 3, "x", "down")
378
            break
379
        case 19:
380
            if (global.party_member != -4)
381
                cutscene_npc_walk(1161, 160, 180, 3, "x", "down")
382
            else
383
                cutscene_advance()
384
            break
385
        case 20:
386
            audio_stop_all()
387
            if (global.last_room_overworld == "rm_steamworks_32")
388
                cutscene_change_room(240, 120, 380, 0.1)
389
            else
390
                cutscene_change_room(202, 840, 280, 0.1)
391
            break
392
    }
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
        screenshake_intensity -= 0.15
410
}