Undertale Yellow script viewer

← back to main script listing

gml_Object_obj_steamworks_33_cutscene_pacifist_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[28] >= 2)
4
{
5
    if (scr_interact
scr_interact

function scr_interact() { if (distance_to_object(obj_pl) < 20 && obj_pl.state == scr_normal_state) { var pl_dir = obj_pl.direction; var pl_x = 0; var pl_y = 0; var check_distance_x = 0; var check_distance_y = 0; switch (pl_dir) { case 0: pl_x = obj_pl.bbox_right; pl_y = obj_pl.bbox_top + 1; check_distance_x = 20; break; case 180: pl_x = obj_pl.bbox_left; pl_y = obj_pl.bbox_top + 1; check_distance_x = -20; break; case 90: pl_x = obj_pl.x; pl_y = obj_pl.bbox_top; check_distance_y = -20; break; case 270: pl_x = obj_pl.x; pl_y = obj_pl.bbox_bottom; check_distance_y = 20; break; } if (collision_line_first(pl_x, pl_y, pl_x + check_distance_x, pl_y + check_distance_y, id, false, false)) return true; } }
() && keyboard_multicheck_pressed(0))
6
    {
7
        scr_text
scr_text

function scr_text() { if (!instance_exists(obj_dialogue)) msg = instance_create(x, y, obj_dialogue); }
();
8
        with (msg)
9
        {
10
            message[0] = "* (You hear the whirring of#  cooling fans inside the hot#  console.)\t";
11
            message[1] = "* (Best leave it be.)";
12
        }
13
    }
14
    exit;
15
}
16
switch (scene)
17
{
18
    case -12:
19
        if (obj_pl.x < 440)
20
        {
21
            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; }
();
22
            instance_create(obj_pl.x, obj_pl.y, obj_player_npc);
23
            cutscene_follower_into_actor();
24
            with (obj_shadow_master)
25
            {
26
                event_perform(ev_alarm, 0);
27
                reverse = true;
28
            }
29
        }
30
        break;
31
    case -11:
32
        audio_play_sound(snd_encounter, 1, 0);
33
        instance_create(obj_ceroba_npc.x, obj_ceroba_npc.y - 40, obj_cutscene_ex);
34
        cutscene_advance();
35
        break;
36
    case -10:
37
        if (cutscene_wait(1))
38
            instance_destroy(obj_cutscene_ex);
39
        break;
40
    case -9:
41
        cutscene_npc_walk(1161, 360, 200, 4, "x", "up");
42
        break;
43
    case -8:
44
        cutscene_wait(1);
45
        break;
46
    case -7:
47
        cutscene_npc_direction(1161, "right");
48
        break;
49
    case -6:
50
        cutscene_dialogue();
51
        with (msg)
52
        {
53
            talker[0] = 1161;
54
            message[0] = "* Whoa...";
55
            message[1] = "* I'm guessing this is our#  ticket out of here.";
56
            prt[0] = 393;
57
            prt[1] = 377;
58
        }
59
        break;
60
    case -5:
61
        cutscene_camera_move(290, 160, 3, true);
62
        scene = -4;
63
        break;
64
    case -4:
65
        cutscene_npc_walk(1161, 290, 160, 3, "x", "up");
66
        cutscene_npc_walk(1168, 320, 180, 3, "x", "up");
67
        scene = -3;
68
        break;
69
    case -3:
70
        if (obj_ceroba_npc.npc_arrived && obj_player_npc.npc_arrived)
71
            cutscene_wait(1);
72
        break;
73
    case -2:
74
        cutscene_dialogue();
75
        with (msg)
76
        {
77
            talker[0] = 1161;
78
            message[0] = "* Just have to... uh...";
79
            message[1] = "* Why don't you take a#  stab at it?";
80
            message[2] = "* Technology and I don't#  exactly mix well.";
81
            prt[0] = 371;
82
            prt[1] = 370;
83
            prt[2] = 377;
84
            if (message_current == 1)
85
                obj_ceroba_npc.npc_direction = "down";
86
        }
87
        break;
88
    case -1:
89
        if (cutscene_npc_walk(1161, obj_player_npc.x, obj_player_npc.y + 20, 3, "y", "up") && cutscene_camera_move(obj_player_npc.x, obj_player_npc.y, 2, true))
90
        {
91
            instance_destroy(obj_player_npc);
92
            cutscene_actor_into_follower();
93
            cutscene_camera_reset(true);
94
            scene = 0;
95
            scr_cutscene_end
scr_cutscene_end

function scr_cutscene_end() { global.cutscene = false; obj_pl.alarm[0] = 1; }
();
96
            global.sworks_flag[28] = 1;
97
        }
98
        else
99
        {
100
            scene = -1;
101
        }
102
        break;
103
    case 0:
104
        if (scr_interact
scr_interact

function scr_interact() { if (distance_to_object(obj_pl) < 20 && obj_pl.state == scr_normal_state) { var pl_dir = obj_pl.direction; var pl_x = 0; var pl_y = 0; var check_distance_x = 0; var check_distance_y = 0; switch (pl_dir) { case 0: pl_x = obj_pl.bbox_right; pl_y = obj_pl.bbox_top + 1; check_distance_x = 20; break; case 180: pl_x = obj_pl.bbox_left; pl_y = obj_pl.bbox_top + 1; check_distance_x = -20; break; case 90: pl_x = obj_pl.x; pl_y = obj_pl.bbox_top; check_distance_y = -20; break; case 270: pl_x = obj_pl.x; pl_y = obj_pl.bbox_bottom; check_distance_y = 20; break; } if (collision_line_first(pl_x, pl_y, pl_x + check_distance_x, pl_y + check_distance_y, id, false, false)) return true; } }
() && keyboard_multicheck_pressed(0))
105
        {
106
            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; }
();
107
            cutscene_advance();
108
        }
109
        break;
110
    case 1:
111
        cutscene_dialogue();
112
        with (msg)
113
        {
114
            message[0] = "* (A daunting array of screens#  and buttons lie before you.)";
115
            message[1] = "* (You press one of the#  buttons.)";
116
        }
117
        break;
118
    case 2:
119
        cutscene_sfx_play(657, 1);
120
        break;
121
    case 3:
122
        cutscene_wait(1);
123
        break;
124
    case 4:
125
        if (!instance_exists(obj_dialogue_steamworks_33))
126
        {
127
            msg = instance_create_depth(0, 0, -9999, obj_dialogue_steamworks_33);
128
            msg.draw_alpha = 0;
129
        }
130
        with (msg)
131
        {
132
            ch_msg = 2;
133
            ch[1] = "Info";
134
            ch[2] = "Docs";
135
            ch[3] = "Pictures";
136
            ch[4] = "Games";
137
            ch[5] = "Settings";
138
            message[0] = "* Robotics Control Status:#  Functioning at 78%.";
139
            message[1] = "* Awaiting input . . .";
140
            message[2] = "* MAIN DIRECTORY:";
141
            switch (outcome)
142
            {
143
                case 1:
144
                    message[3] = "* Steamworks Station R#  System";
145
                    message[4] = "* OS Delta - Version 1.4 -#  Installed X/X/20XX";
146
                    message[5] = "* Processor - Ultra McTurbo#  Core 180 - 0.5GHz";
147
                    message[6] = "* Installed Physical Memory -#  500 MB";
148
                    message[7] = "* Graphics Card - ERROR";
149
                    break;
150
                case 2:
151
                    message[3] = "* ERROR - Information#  classified.";
152
                    break;
153
                case 3:
154
                    message[3] = "* Loading . . .";
155
                    message[4] = "* Estimated time remaining:#  9 hours . . .";
156
                    break;
157
                case 4:
158
                    message[3] = "* Loading . . .";
159
                    message[4] = "* Feature BLOCKED.";
160
                    message[5] = "* Custom message: Trying to#  play video games on#  the job? ";
161
                    message[6] = "* Please report to the head#  office. We have a#  pink-colored gift for you.";
162
                    break;
163
                case 5:
164
                    message_reset = true;
165
                    other.scene = 5;
166
                    break;
167
            }
168
        }
169
        if (!global.dialogue_open)
170
        {
171
            msg.message_reset = true;
172
            cutscene_advance(4);
173
            return true;
174
        }
175
        break;
176
    case 5:
177
        with (msg)
178
        {
179
            ch_msg = 0;
180
            ch[1] = "Emergency Shutdown";
181
            ch[2] = "Back";
182
            message[0] = "* Select your option.";
183
            switch (outcome)
184
            {
185
                case 1:
186
                    other.scene = 6;
187
                    message_reset = true;
188
                    break;
189
                case 2:
190
                    other.scene = 4;
191
                    message_reset = true;
192
                    break;
193
            }
194
        }
195
        break;
196
    case 6:
197
        with (msg)
198
        {
199
            ch_msg = 0;
200
            ch[1] = "Yes";
201
            ch[2] = "No";
202
            message[0] = "* Shut down all helper bots#  within the vicinity?";
203
            switch (outcome)
204
            {
205
                case 1:
206
                    message[1] = "* Attempting shut down . . .";
207
                    message[2] = "* . . .";
208
                    message[3] = "* ERROR: Could not complete#  task.";
209
                    message[4] = "* . . .";
210
                    message[5] = "* Just kidding ;)";
211
                    message[6] = "* Emergency shutdown#  complete.";
212
                    other.scene = 7;
213
                    break;
214
                case 2:
215
                    message[1] = "* Why did you select this#  option then?";
216
                    break;
217
            }
218
        }
219
        if (!global.dialogue_open)
220
        {
221
            msg.message_reset = true;
222
            cutscene_advance(5);
223
        }
224
        break;
225
    case 7:
226
        if (global.dialogue_open)
227
            exit;
228
        msg.message_reset = true;
229
        msg.fade_out = true;
230
        cutscene_advance();
231
        break;
232
    case 8:
233
        if (instance_exists(obj_dialogue_steamworks_33))
234
            exit;
235
        cutscene_advance();
236
        break;
237
    case 9:
238
        cutscene_wait(0.5);
239
        break;
240
    case 10:
241
        obj_steamworks_33_bridge.active = true;
242
        obj_pl.direction = 180;
243
        audio_sound_gain(obj_radio.current_song, 0, 500);
244
        cutscene_follower_into_actor();
245
        break;
246
    case 11:
247
        cutscene_npc_direction(1161, "left");
248
        break;
249
    case 12:
250
        if (obj_steamworks_33_bridge.active == false)
251
            cutscene_advance();
252
        break;
253
    case 13:
254
        audio_sound_gain(obj_radio.current_song, 1, 500);
255
        cutscene_advance();
256
        break;
257
    case 14:
258
        cutscene_npc_walk(1161, 210, 190, 3, "y", "left");
259
        break;
260
    case 15:
261
        cutscene_dialogue();
262
        with (msg)
263
        {
264
            talker[0] = 1161;
265
            message[0] = "* I hope that worked.";
266
            message[1] = "* It's unfortunate Axis#  had to end up this way.";
267
            message[2] = "* Maybe I should...";
268
            message[3] = "* No.";
269
            message[4] = "* I wish Chujin's project#  could thrive but a line#  had to be drawn.";
270
            message[5] = "* Can't dwell in the past#  any longer.";
271
            message[6] = "* Let's go.";
272
            prt[0] = 377;
273
            prt[1] = 371;
274
            prt[2] = 394;
275
            prt[3] = 377;
276
            prt[4] = 371;
277
            prt[5] = 371;
278
            prt[6] = 370;
279
            if (message_current == 1)
280
                obj_ceroba_npc.npc_direction = "up";
281
            if (message_current == 4)
282
                obj_ceroba_npc.npc_direction = "left";
283
        }
284
        break;
285
    case 16:
286
        if (cutscene_npc_walk(1161, obj_pl.x + 20, obj_pl.y, 3, "y", "left"))
287
        {
288
            cutscene_actor_into_follower();
289
            scene = 17;
290
        }
291
        break;
292
    case 17:
293
        scr_cutscene_end
scr_cutscene_end

function scr_cutscene_end() { global.cutscene = false; obj_pl.alarm[0] = 1; }
();
294
        cutscene_advance();
295
        instance_destroy(105663);
296
        ds_list_clear(global.encounter_list);
297
        global.sworks_flag[28] = 2;
298
        break;
299
}