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() //gml_Script_scr_interact { if (distance_to_object(obj_pl) < 20 && obj_pl.state == gml_Script_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() //gml_Script_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.)	"
11
            message[1] = "* (Best leave it be.)"
12
        }
13
    }
14
    return;
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() //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 }
()
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(obj_ceroba_npc, "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() //gml_Script_scr_cutscene_end { global.cutscene = false obj_pl.alarm[0] = 1 }
()
96
            global.sworks_flag[28] = 1
97
        }
98
        else
99
            scene = -1
100
        break
101
    case 0:
102
        if (scr_interact
scr_interact

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

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