Undertale Yellow script viewer

← back to main script listing

gml_Object_obj_wild_east_cutscene_01_murder_Step_0

(view raw script w/o annotations or w/e)
1
if live_call()
2
    return global.live_result;
3
switch scene
4
{
5
    case 0:
6
        if (obj_pl.y < 600)
7
        {
8
            instance_create(obj_pl.x, obj_pl.y, obj_player_npc)
9
            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 }
()
10
            cutscene_advance()
11
        }
12
        break
13
    case 1:
14
        cutscene_npc_walk(1168, 720, 540, 3, "y", "up")
15
        break
16
    case 2:
17
        cutscene_camera_move(720, 440, 1)
18
        break
19
    case 3:
20
        cutscene_wait(0.25)
21
        break
22
    case 4:
23
        cutscene_dialogue()
24
        with (msg)
25
        {
26
            talker[0] = 1169
27
            message[0] = "* She told me to run."
28
            message[1] = "* She told me to hide."
29
            message[2] = "* But nah..."
30
            message[3] = "* That ain't what a#  dignified sheriff would#  do."
31
            prt[0] = 420
32
            prt[1] = 420
33
            prt[2] = 416
34
            prt[3] = 418
35
            position = 0
36
        }
37
        break
38
    case 5:
39
        cutscene_wait(0.25)
40
        break
41
    case 6:
42
        cutscene_npc_direction(obj_starlo_npc, "down")
43
        break
44
    case 7:
45
        cutscene_wait(0.25)
46
        break
47
    case 8:
48
        cutscene_dialogue()
49
        with (msg)
50
        {
51
            talker[0] = 1169
52
            message[0] = "* You see, I've heard#  you've been up to no#  good."
53
            message[1] = "* You've been mozyin'#  'round..."
54
            message[2] = "* ...Terrorizin' the nice#  folk of this underground#  settlement."
55
            message[3] = "* You're an outlaw."
56
            message[4] = "* My job..."
57
            message[5] = "* My job is to bring#  justice upon folks like#  you."
58
            message[6] = "* Folks who take pleasure#  in disturbin' the peace."
59
            message[7] = "* Now..."
60
            message[8] = "* You have a method to#  what yer doin'."
61
            message[9] = "* You coulda shot me by#  now but ya haven't."
62
            message[10] = "* Howabout we settle this#  fairly?"
63
            message[11] = "* A... dual."
64
            message[12] = "* Fastest to their weapon#  wins."
65
            prt[0] = 418
66
            prt[1] = 421
67
            prt[2] = 421
68
            prt[3] = 419
69
            prt[4] = 418
70
            prt[5] = 421
71
            prt[6] = 419
72
            prt[7] = 416
73
            prt[8] = 418
74
            prt[9] = 418
75
            prt[10] = 421
76
            prt[11] = 421
77
            prt[12] = 421
78
            position = 0
79
        }
80
        break
81
    case 9:
82
        cutscene_wait(1)
83
        break
84
    case 10:
85
        cutscene_npc_walk(1168, 720, 490, 1, "y", "up")
86
        break
87
    case 11:
88
        cutscene_wait(0.25)
89
        break
90
    case 12:
91
        cutscene_npc_walk(1169, 720, 450, 1, "y", "down")
92
        break
93
    case 13:
94
        cutscene_wait(0.2)
95
        break
96
    case 14:
97
        cutscene_npc_walk(1168, 740, 490, 1, "x", "left")
98
        break
99
    case 15:
100
        cutscene_npc_walk(1169, 700, 490, 1, "x", "right")
101
    case 16:
102
        cutscene_wait(1)
103
        break
104
    case 17:
105
        cutscene_dialogue()
106
        with (msg)
107
        {
108
            talker[0] = 1169
109
            message[0] = "* Ten paces."
110
            prt[0] = 421
111
        }
112
        break
113
    case 18:
114
        cutscene_npc_walk(1169, 580, 490, 1, "x", "right")
115
        cutscene_npc_walk(1168, 860, 490, 1, "x", "left")
116
        instance_create(160, 90, obj_duel_mark_murder)
117
        cutscene_advance()
118
        break
119
    case 19:
120
        if (obj_player_npc.npc_arrived && obj_starlo_npc.npc_arrived)
121
            cutscene_advance()
122
        break
123
    case 20:
124
        cutscene_npc_action_sprite(1169, 223, 0, true)
125
        cutscene_npc_action_sprite(1168, 316, 0, true)
126
        cutscene_advance()
127
        break
128
    case 21:
129
        if (cutscene_duel_timer == 0)
130
            cutscene_duel_timer = 2
131
        cutscene_wait(cutscene_duel_timer)
132
        if cutscene_key_prompt()
133
        {
134
            obj_player_npc.npc_direction = "left"
135
            obj_player_npc.can_walk = false
136
            obj_starlo_npc.npc_direction = "right"
137
            obj_starlo_npc.can_walk = false
138
            obj_starlo_npc.image_index = 0
139
            obj_starlo_npc.image_speed = 0
140
            cutscene_advance(28)
141
            instance_destroy(obj_duel_mark_murder)
142
        }
143
        break
144
    case 22:
145
        cutscene_duel_timer = 0
146
        cutscene_duel_delay = 10
147
        cutscene_advance()
148
        break
149
    case 23:
150
        if (obj_starlo_npc.image_speed == 0)
151
        {
152
            if (cutscene_duel_delay > 0)
153
                cutscene_duel_delay -= 1
154
            if (cutscene_duel_delay == 0)
155
            {
156
                audio_play_sound(snd_duel_mark, 1, 0)
157
                cutscene_advance()
158
            }
159
        }
160
        break
161
    case 24:
162
        instance_destroy(obj_duel_mark_murder)
163
        cutscene_npc_action_sprite(1169, 223, 0.6, true, 0)
164
        cutscene_sfx_play_at_frame(1169, 6, 248)
165
        break
166
    case 25:
167
        cutscene_npc_action_sprite(1168, 33, (1/3), true, 0)
168
        break
169
    case 26:
170
        cutscene_wait(0.5)
171
        break
172
    case 27:
173
        cutscene_dialogue()
174
        with (msg)
175
        {
176
            sndfnt = 107
177
            message[0] = "* Heh..."
178
            message[1] = "* I... can't do it."
179
            message[2] = "* Not for real."
180
            message[3] = "* I'm... I'm such a#  fraud..."
181
            message[4] = "* ..."
182
            message[5] = "* Thanks for letting me#  feel cool for a short#  moment."
183
            prt[0] = 413
184
            prt[1] = 415
185
            prt[2] = 416
186
            prt[3] = 418
187
            prt[4] = 406
188
            prt[5] = 420
189
        }
190
        break
191
    case 28:
192
        if cutscene_wait(0.25)
193
            audio_play_sound(snd_guardener_gun_cock, 1, 0)
194
        break
195
    case 29:
196
        cutscene_npc_action_sprite(1168, 316, 1, true, 0, 232, 7)
197
        if (obj_player_npc.image_index >= 2 && (!instance_exists(obj_wild_east_shot_overworld)))
198
        {
199
            instance_create(obj_starlo_npc.x, (obj_starlo_npc.y - 10), obj_wild_east_shot_overworld)
200
            obj_wild_east_shot_overworld.image_speed = 0
201
            obj_wild_east_shot_overworld.image_index = 0
202
        }
203
        if (obj_player_npc.image_index >= 7)
204
        {
205
            obj_wild_east_shot_overworld.image_speed = 0.5
206
            cutscene_advance(31)
207
            return;
208
        }
209
        if (instance_exists(obj_wild_east_shot_overworld) && obj_player_npc.image_index >= 1)
210
        {
211
            obj_wild_east_shot_overworld.image_index = 3 * ((obj_player_npc.image_index - 2) / 5)
212
            show_debug_message(obj_wild_east_shot_overworld.image_index)
213
        }
214
        break
215
    case 30:
216
        instance_create(obj_starlo_npc.x, (obj_starlo_npc.y - 40), obj_wild_east_shot_overworld)
217
        cutscene_advance()
218
        break
219
    case 31:
220
        cutscene_sfx_play(snd_monster_damage_hit, 1)
221
        starlo_shake_x = 3
222
        starlo_x_original = obj_starlo_npc.x
223
        with (obj_starlo_npc)
224
        {
225
            action_sprite = true
226
            sprite_index = spr_starlo_goggleless_shot
227
            image_speed = (1/3)
228
            image_index = 0
229
        }
230
        break
231
    case 32:
232
        cutscene_timer++
233
        if (cutscene_timer >= 5)
234
        {
235
            obj_starlo_npc.x = starlo_x_original + starlo_shake_x
236
            cutscene_timer = 0
237
            starlo_shake_x = lerp((-starlo_shake_x), 0, 0.5)
238
        }
239
        if floor(starlo_shake_x == 0)
240
            cutscene_advance()
241
        with (obj_starlo_npc)
242
        {
243
            if (image_index >= 7)
244
            {
245
                image_speed = 0
246
                image_index = 7
247
            }
248
        }
249
        break
250
    case 33:
251
        cutscene_wait(0.5)
252
        break
253
    case 34:
254
        with (obj_starlo_npc)
255
        {
256
            image_speed = (1/3)
257
            if (image_index >= (image_number - 1))
258
            {
259
                image_speed = 0
260
                image_index = image_number - 1
261
                with (other)
262
                    cutscene_advance()
263
            }
264
        }
265
        break
266
    case 35:
267
        cutscene_wait(0.25)
268
        break
269
    case 36:
270
        cutscene_instance_create((obj_starlo_npc.x + 30), 710, obj_ceroba_npc)
271
        break
272
    case 37:
273
        cutscene_dialogue()
274
        with (msg)
275
        {
276
            talker[0] = 1161
277
            message[0] = "* Star! Everyone's#  evacuated!"
278
            message[1] = "* Why are you still here?#  I told you to-"
279
            prt[0] = 370
280
            prt[1] = 370
281
        }
282
        break
283
    case 38:
284
        cutscene_npc_walk(1161, obj_ceroba_npc.x, (obj_starlo_npc.y + 60), 3, "y", "up")
285
        break
286
    case 39:
287
        cutscene_dialogue()
288
        with (msg)
289
        {
290
            talker[0] = 1161
291
            message[0] = "* !"
292
            message[1] = "* STARLO!!!"
293
            prt[0] = 381
294
            prt[1] = 381
295
        }
296
        break
297
    case 40:
298
        cutscene_npc_set_sprites(obj_ceroba_npc, 67, 68, 66, 69, 61, 65, 60, 63)
299
        break
300
    case 41:
301
        cutscene_npc_walk(1161, obj_ceroba_npc.x, obj_starlo_npc.y, 4, "y", "left")
302
        break
303
    case 42:
304
        cutscene_music = audio_play_sound(mus_sadlo, 1, 0)
305
        cutscene_advance()
306
        break
307
    case 43:
308
        obj_ceroba_npc.image_alpha = 0
309
        cutscene_action_sprite(1169, 226, 0.25, true, 0)
310
        break
311
    case 44:
312
        cutscene_camera_move((obj_starlo_npc.x + 20), obj_starlo_npc.y, 3, false)
313
        break
314
    case 45:
315
        cutscene_wait(0.1)
316
        break
317
    case 46:
318
        background_fade_alpha += 0.025
319
        if (background_fade_alpha >= 1)
320
            cutscene_advance()
321
        break
322
    case 47:
323
        cutscene_dialogue()
324
        with (msg)
325
        {
326
            talker[0] = 1169
327
            talker[1] = 1161
328
            talker[2] = 1169
329
            talker[3] = 1161
330
            talker[6] = 1169
331
            message[0] = "* C-Ceroba I..."
332
            message[1] = "* Nonononono, why didn't#  you listen!?"
333
            message[2] = "* I almost w... won..."
334
            message[3] = "* Y-you... did your best."
335
            message[4] = "* You're the greatest#  s-sheriff in the#  Underground, Starlo."
336
            message[5] = "* You are."
337
            message[6] = "* Th... thanks... for#  playing a... along all#  these... years."
338
            message[7] = "* Now... d... do what's#  right."
339
            message[8] = "* Deliver... "
340
            message[9] = "* J-Justice."
341
            prt[0] = 410
342
            prt[1] = 381
343
            prt[2] = 416
344
            prt[3] = 377
345
            prt[4] = 377
346
            prt[5] = 377
347
            prt[6] = 413
348
            prt[7] = 410
349
            prt[8] = 410
350
            prt[9] = 416
351
        }
352
        break
353
    case 48:
354
        cutscene_wait(0.25)
355
        break
356
    case 49:
357
        cutscene_action_sprite(1169, 227, 0.25, true, 0, 412, 40)
358
        break
359
    case 50:
360
        cutscene_wait(0.5)
361
        break
362
    case 51:
363
        cutscene_audio_fade(cutscene_music, 0, 500, 0.25, false, true)
364
        break
365
    case 52:
366
        cutscene_wait(1)
367
        break
368
    case 53:
369
        obj_player_npc.x = (__view_get((0 << 0), 0)) + 320 + 30
370
        obj_player_npc.action_sprite = false
371
        cutscene_advance()
372
        break
373
    case 54:
374
        cutscene_camera_move((obj_starlo_npc.x + 80), obj_starlo_npc.y, 0.5, 0, false)
375
        break
376
    case 55:
377
        cutscene_wait(0.5)
378
        break
379
    case 56:
380
        cutscene_dialogue()
381
        with (msg)
382
        {
383
            sndfnt = 108
384
            message[0] = "* ..."
385
            message[1] = "* ..."
386
            prt[0] = 394
387
            prt[1] = 366
388
            portrait_can_animate = false
389
        }
390
        break
391
    case 57:
392
        cutscene_npc_reset_sprite(1161, "left")
393
        obj_ceroba_npc.image_alpha = 1
394
        instance_destroy(obj_starlo_npc)
395
        break
396
    case 58:
397
        cutscene_wait(0.25)
398
        break
399
    case 59:
400
        cutscene_dialogue()
401
        with (msg)
402
        {
403
            sndfnt = 108
404
            message[0] = "* ..."
405
            prt[0] = 366
406
            portrait_can_animate = false
407
        }
408
        break
409
    case 60:
410
        cutscene_wait(0.05)
411
        break
412
    case 61:
413
        cutscene_npc_set_sprites(obj_ceroba_npc, 81, 80, 78, 79, 61, 65, 60, 63)
414
    case 62:
415
        cutscene_npc_walk(1161, (obj_player_npc.x - 30), obj_ceroba_npc.y, 6, "x", "right")
416
        break
417
    case 63:
418
        obj_pl.direction = 180
419
        obj_player_npc.image_alpha = 0
420
        obj_ceroba_npc.image_alpha = 0
421
        cutscene_battle_initiate("ceroba genocide", true, false)
422
        break
423
}
424
425
if (scene >= 19 && scene <= 21 && obj_duel_mark_murder.draw_alpha > 0)
426
{
427
    if cutscene_key_prompt()
428
    {
429
        obj_player_npc.npc_direction = "left"
430
        obj_player_npc.can_walk = false
431
        obj_starlo_npc.npc_direction = "right"
432
        obj_starlo_npc.can_walk = false
433
        obj_starlo_npc.image_index = 0
434
        obj_starlo_npc.image_speed = 0
435
        cutscene_advance(28)
436
        instance_destroy(obj_duel_mark_murder)
437
    }
438
}
439
if (scene >= 42 && instance_exists(obj_starlo_npc))
440
    obj_starlo_npc.depth = depth - 1
441
if (scene >= 54)
442
    obj_player_npc.depth = depth - 1
443
if (scene >= 57)
444
    obj_ceroba_npc.depth = depth - 1