Undertale Yellow script viewer

← back to main script listing

gml_Object_obj_factory_04_controller_Step_0

(view raw script w/o annotations or w/e)
1
switch (scene)
2
{
3
    case 0:
4
        scr_cutscene_start
scr_cutscene_start

function scr_cutscene_start() { global.cutscene = true; obj_pl.state = scr_frozen_state; obj_pl.image_index = 0; obj_pl.image_speed = 0; }
();
5
        if (global.party_member != -4 && instance_exists(global.party_member))
6
            instance_destroy(global.party_member);
7
        instance_create(obj_pl.x, obj_pl.y, obj_player_npc);
8
        actor_follower = instance_create(obj_pl.x - 30, obj_pl.y, obj_ceroba_npc);
9
        scene++;
10
        break;
11
    case 1:
12
        cutscene_wait(0.5);
13
        break;
14
    case 2:
15
        cutscene_npc_walk(1161, 220, 620, 3, "x", "up");
16
        cutscene_npc_walk(1168, 220, 640, 3, "x", "up");
17
        scene = 3;
18
        break;
19
    case 3:
20
        if (obj_ceroba_npc.npc_arrived && obj_player_npc.npc_arrived)
21
            cutscene_wait(1);
22
        break;
23
    case 4:
24
        cutscene_camera_move(220, 540, 2);
25
        break;
26
    case 5:
27
        cutscene_wait(0.25);
28
        break;
29
    case 6:
30
        cutscene_dialogue();
31
        with (msg)
32
        {
33
            talker[0] = 1161;
34
            message[0] = "* Workstations...";
35
            message[1] = "* Okay, well... Probably#  another code to find.";
36
            message[2] = "* You know the drill.";
37
            prt[0] = 377;
38
            prt[1] = 371;
39
            prt[2] = 370;
40
            if (message_current >= 1)
41
                obj_ceroba_npc.npc_direction = "down";
42
        }
43
        break;
44
    case 7:
45
        cutscene_npc_walk(1161, 220, 660, 3, "y", "up");
46
        break;
47
    case 8:
48
        cutscene_camera_move(obj_pl.x, obj_pl.y, 2);
49
        break;
50
    case 9:
51
        cutscene_actor_into_follower();
52
        cutscene_camera_reset(true);
53
        instance_destroy(obj_player_npc);
54
        scr_cutscene_end
scr_cutscene_end

function scr_cutscene_end() { global.cutscene = false; obj_pl.alarm[0] = 1; }
();
55
        global.sworks_flag[38] = 1;
56
        break;
57
    case 10:
58
        if (obj_pl.y <= 300)
59
        {
60
            scr_cutscene_start
scr_cutscene_start

function scr_cutscene_start() { global.cutscene = true; obj_pl.state = scr_frozen_state; obj_pl.image_index = 0; obj_pl.image_speed = 0; }
();
61
            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, 1000);
62
            cutscene_advance();
63
        }
64
        break;
65
    case 11:
66
        cutscene_follower_into_actor();
67
        break;
68
    case 12:
69
        cutscene_npc_walk(actor_follower, 220, 280, 3, "x", "up");
70
        break;
71
    case 13:
72
        cutscene_wait(0.5);
73
        break;
74
    case 14:
75
        cutscene_camera_move(220, 230, 2);
76
        break;
77
    case 15:
78
        cutscene_wait(0.5);
79
        break;
80
    case 16:
81
        cutscene_dialogue();
82
        with (msg)
83
        {
84
            talker[0] = 1161;
85
            message[0] = "* Must be the manager's#  office.";
86
            message[1] = "* Surely they had access#  to all passcodes.";
87
            message[2] = "* Let's check those file#  cabinets.";
88
            prt[0] = 371;
89
            prt[1] = 371;
90
            prt[2] = 370;
91
            if (message_current >= 2)
92
                obj_ceroba_npc.npc_direction = "down";
93
        }
94
        break;
95
    case 17:
96
        instance_create(obj_pl.x, obj_pl.y, obj_player_npc);
97
        cutscene_npc_walk(1161, 220, 250, 3, "x", "up", -4, 290, 180);
98
        cutscene_npc_walk(1168, 220, 250, 3, "x", "up", -4, 270, 220);
99
        scene = 18;
100
        break;
101
    case 18:
102
        if (obj_ceroba_npc.npc_arrived && obj_player_npc.npc_arrived)
103
            cutscene_wait(0.5);
104
        break;
105
    case 19:
106
        cutscene_dialogue();
107
        with (msg)
108
        {
109
            talker[0] = 1161;
110
            message[0] = "* ...";
111
            message[1] = "* Hold on, look here.";
112
            message[2] = "* Performance reports for#  all factory employees.";
113
            message[3] = "* A... B...";
114
            message[4] = "* ...";
115
            prt[0] = 371;
116
            prt[1] = 370;
117
            prt[2] = 371;
118
            prt[3] = 371;
119
            prt[4] = 609;
120
            if (message_current == 1)
121
                obj_ceroba_npc.npc_direction = "down";
122
            if (message_current == 2)
123
                obj_ceroba_npc.npc_direction = "up";
124
        }
125
        break;
126
    case 20:
127
        cutscene_npc_action_sprite(1161, 3667, 1, true, 0);
128
        break;
129
    case 21:
130
        cutscene_wait(0.3);
131
        break;
132
    case 22:
133
        cutscene_dialogue();
134
        with (msg)
135
        {
136
            talker[0] = 1161;
137
            message[0] = "* \"01/16/20XX...";
138
            message[1] = "* Mr. Chujin pitched his#  blueprints for a \"guard bot\" of#  sorts.";
139
            message[2] = "* He called the project: AXIS.\"";
140
        }
141
        break;
142
    case 23:
143
        cutscene_music_start(532, 500);
144
        break;
145
    case 24:
146
        cutscene_npc_action_sprite(1161, 2938, 1, true, 0, 372, 9);
147
        break;
148
    case 25:
149
        obj_ceroba_npc.image_index = obj_ceroba_npc.image_number - 1;
150
        cutscene_wait(0.3);
151
        break;
152
    case 26:
153
        cutscene_dialogue();
154
        with (msg)
155
        {
156
            talker[0] = 1161;
157
            message[0] = "* \"03/19/20XX...";
158
            message[1] = "* Axis Model 01 was presented to#  King ASGORE but was swiftly#  rejected.";
159
            message[2] = "* The poor thing couldn't stay#  powered up for more than six#  seconds.\"";
160
        }
161
        break;
162
    case 27:
163
        cutscene_npc_action_sprite_reverse(1161, 2938, 1, true, 0, 372, 9);
164
        break;
165
    case 28:
166
        obj_ceroba_npc.image_index = 0;
167
        cutscene_wait(0.3);
168
        break;
169
    case 29:
170
        cutscene_dialogue();
171
        with (msg)
172
        {
173
            talker[0] = 1161;
174
            message[0] = "* \"05/10/20XX...";
175
            message[1] = "* Axis Model 04 backfired and#  shot one of its gloves at the#  King.";
176
            message[2] = "* This is getting embarrassing.\"";
177
        }
178
        break;
179
    case 30:
180
        cutscene_npc_action_sprite(1161, 2938, 1, true, 0, 372, 9);
181
        break;
182
    case 31:
183
        obj_ceroba_npc.image_index = obj_ceroba_npc.image_number - 1;
184
        cutscene_wait(0.3);
185
        break;
186
    case 32:
187
        cutscene_dialogue();
188
        with (msg)
189
        {
190
            talker[0] = 1161;
191
            message[0] = "* \"07/23/20XX...";
192
            message[1] = "* Axis Model 07 refused to enter#  the throne room.";
193
            message[2] = "* ...ASGORE gave Chujin one more#  shot after incessant pleading.";
194
            message[3] = "* I know he's a smart engineer#  but if the next showcase goes#  south...\"";
195
        }
196
        break;
197
    case 33:
198
        obj_ceroba_npc.image_index = 0;
199
        cutscene_wait(0.3);
200
        break;
201
    case 34:
202
        cutscene_dialogue();
203
        with (msg)
204
        {
205
            sndfnt = 108;
206
            message[0] = "...";
207
            prt[0] = 609;
208
        }
209
        break;
210
    case 35:
211
        cutscene_npc_action_sprite_reverse(1161, 2938, 1, true, 0, 372, 9);
212
        break;
213
    case 36:
214
        obj_ceroba_npc.image_index = 0;
215
        cutscene_wait(0.3);
216
        break;
217
    case 37:
218
        cutscene_dialogue();
219
        with (msg)
220
        {
221
            talker[0] = 1161;
222
            message[0] = "* \"09/23/20XX...";
223
            message[1] = "* Well, this is it.";
224
            message[2] = "* Model 08 booted up and seemed#  to be stable for a moment.";
225
            message[3] = "* That was until a malfunction#  occurred and sparks began to#  emit from the body.";
226
            message[4] = "* In the chaos, one spark leaped#  onto King ASGORE's flower bed.";
227
            message[5] = "* ...A fire ignited but was#  swiftly put out.";
228
        }
229
        break;
230
    case 38:
231
        cutscene_wait(0.2);
232
        break;
233
    case 39:
234
        if (draw_alpha < 1)
235
            draw_alpha += 0.1;
236
        else
237
            scene++;
238
        break;
239
    case 40:
240
        cutscene_wait(1);
241
        break;
242
    case 41:
243
        cutscene_dialogue();
244
        with (msg)
245
        {
246
            color = true;
247
            col_modif[0] = make_color_rgb(94, 84, 146);
248
            col_modif[1] = make_color_rgb(51, 178, 106);
249
            sndfnt_array[0] = 267;
250
            sndfnt_array[1] = 626;
251
            sndfnt_array[4] = 267;
252
            sndfnt_array[5] = 626;
253
            sndfnt_array[6] = 267;
254
            message[0] = "* Please leave. Leave and do not#  return.";
255
            message_col[0][0] = "* Please leave. Leave and do not#  return.";
256
            message[1] = "* I... I apologize deeply.";
257
            message[2] = "* But as we are, us monsters#  simply aren't ready to bypass#  the barrier!";
258
            message[3] = "* You know this deep down... I#  know you do. Axis IS the#  solution you need!'";
259
            message_col[1][1] = message[1];
260
            message_col[2][1] = message[2];
261
            message_col[3][1] = message[3];
262
            message[4] = "* The solution I need is a#  reliable one. One that won't#  set fire to our homes.";
263
            message[5] = "* If this is about my...";
264
            message[6] = "* It isn't.";
265
            message[7] = "* I thank you for your service to#  society...";
266
            message[8] = "* ...But I'm afraid monsterkind's#  freedom belongs in more capable#  hands.'\"";
267
            message_col[4][0] = message[4];
268
            message_col[5][1] = message[5];
269
            message_col[6][0] = message[6];
270
            message_col[7][0] = message[7];
271
            message_col[8][0] = message[8];
272
            if (message_current == 5)
273
            {
274
                skippable = false;
275
                message_timer = 20;
276
            }
277
            else
278
            {
279
                skippable = true;
280
                message_timer = -1;
281
            }
282
        }
283
        break;
284
    case 42:
285
        cutscene_wait(1);
286
        break;
287
    case 43:
288
        if (draw_alpha > 0)
289
            draw_alpha -= 0.1;
290
        else
291
            scene++;
292
        break;
293
    case 44:
294
        cutscene_wait(1);
295
        break;
296
    case 45:
297
        cutscene_dialogue();
298
        with (msg)
299
        {
300
            sndfnt = 108;
301
            message[0] = "...";
302
            prt[0] = 609;
303
        }
304
        break;
305
    case 46:
306
        cutscene_action_sprite(1161, 2209, 1, true, 0, 621, 1);
307
        break;
308
    case 47:
309
        if (!instance_exists(obj_factory_04_torn_documents))
310
            instance_create(obj_ceroba_npc.x, obj_ceroba_npc.y, obj_factory_04_torn_documents);
311
        cutscene_wait(1);
312
        break;
313
    case 48:
314
        cutscene_dialogue();
315
        with (msg)
316
        {
317
            talker[0] = 1161;
318
            message[0] = "* \"Capable hands\" he#  says.";
319
            message[1] = "* Look at Axis now. The#  TRUE realization of#  Chujin's vision.";
320
            message[2] = "* He far exceeds ANY model#  Asgore ever saw!";
321
            message[3] = "* And you know who those#  \"capable hands\" now#  belong to? ";
322
            message[4] = "* The scientist who has#  Kanako.";
323
            message[5] = "* Dr. Alphys.";
324
            message[6] = "* ...";
325
            prt[0] = 609;
326
            prt[1] = 609;
327
            prt[2] = 609;
328
            prt[3] = 609;
329
            prt[4] = 609;
330
            prt[5] = 609;
331
            prt[6] = 394;
332
        }
333
        break;
334
    case 49:
335
        cutscene_npc_action_sprite(1161, 3342, 1, true, 0);
336
        break;
337
    case 50:
338
        cutscene_wait(0.3);
339
        break;
340
    case 51:
341
        cutscene_dialogue();
342
        with (msg)
343
        {
344
            talker[0] = 1161;
345
            message[0] = "* A while back, she built#  a robot too.";
346
            message[1] = "* One so \"lifelike\" it#  got her the position she#  has now.";
347
            message[2] = "* It must've been real#  impressive!";
348
            message[3] = "* So impressive that#  Asgore kicked the other#  visionaries to the curb.";
349
            message[4] = "* ...";
350
            message[5] = "* I understand now... Why#  Chujin never shared this#  with me...";
351
            prt[0] = 370;
352
            prt[1] = 394;
353
            prt[2] = 377;
354
            prt[3] = 368;
355
            prt[4] = 609;
356
            prt[5] = 394;
357
            message[6] = "* He must've been#  absolutely gutted#  hearing those words... ";
358
            message[7] = "* ...";
359
            message[8] = "* Screw the Royals.";
360
            message[9] = "* The politics, all the#  red tape...";
361
            message[10] = "* This, Clover, this is#  why the mission is so#  important.";
362
            message[11] = "* You can't trust these#  close-minded gatekeepers#  to do anything right.";
363
            message[12] = "* Not for a second.";
364
            prt[6] = 394;
365
            prt[7] = 394;
366
            prt[8] = 366;
367
            prt[9] = 368;
368
            prt[10] = 2735;
369
            prt[11] = 2735;
370
            prt[12] = 366;
371
            if (message_current == 7)
372
            {
373
                obj_ceroba_npc.action_sprite = false;
374
                obj_ceroba_npc.npc_direction = "right";
375
            }
376
            if (message_current == 10)
377
                obj_ceroba_npc.npc_direction = "down";
378
        }
379
        break;
380
    case 52:
381
        cutscene_npc_reset_sprite(1161, "up");
382
        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; }
(cutscene_music, 1000);
383
        break;
384
    case 53:
385
        cutscene_wait(2.5);
386
        break;
387
    case 54:
388
        cutscene_npc_direction(1161, "down");
389
        break;
390
    case 55:
391
        cutscene_dialogue();
392
        with (msg)
393
        {
394
            talker[0] = 1161;
395
            message[0] = "* ...";
396
            message[1] = "* Let's go.";
397
            prt[0] = 394;
398
            prt[1] = 370;
399
        }
400
        break;
401
    case 56:
402
        cutscene_npc_walk(1161, obj_pl.x, obj_pl.y + 20, 3, "y", "up");
403
        break;
404
    case 57:
405
        cutscene_camera_move(obj_pl.x, obj_pl.y, 2);
406
        break;
407
    case 58:
408
        cutscene_actor_into_follower();
409
        cutscene_camera_reset(true);
410
        instance_destroy(obj_player_npc);
411
        global.sworks_flag[38] = 2;
412
        scr_radio_restart
scr_radio_restart

function scr_radio_restart() { with (obj_radio) event_user(0); }
();
413
        cutscene_end();
414
        break;
415
}