Undertale Yellow script viewer

← back to main script listing

gml_Object_obj_steamworks_04_controller_Step_0

(view raw script w/o annotations or w/e)
1
if (global.sworks_flag[0] == 2)
2
{
3
    switch (scene)
4
    {
5
        case 0:
6
            cutscene_wait(1);
7
            break;
8
        case 1:
9
            cutscene_npc_walk_relative(actor_clover, 0, -30, 1, "y", "up");
10
            break;
11
        case 2:
12
            cutscene_dialogue();
13
            with (msg)
14
            {
15
                talker[0] = 1161;
16
                message[0] = "* Guess I should've#  expected this.";
17
                prt[0] = 377;
18
            }
19
            break;
20
        case 3:
21
            cutscene_npc_direction(actor_ceroba, "down");
22
            break;
23
        case 4:
24
            cutscene_wait(0.25);
25
            break;
26
        case 5:
27
            cutscene_dialogue();
28
            with (msg)
29
            {
30
                talker[0] = 1161;
31
                message[0] = "* In its prime, this was#  the main power source of#  the Underground.";
32
                message[1] = "* That, obviously, was#  many years ago.";
33
                message[2] = "* Until we breathe life#  back into this thing, we#  can't progress.";
34
                prt[0] = 370;
35
                prt[1] = 371;
36
                prt[2] = 394;
37
            }
38
            break;
39
        case 6:
40
            cutscene_wait(0.5);
41
            break;
42
        case 7:
43
            cutscene_camera_move(obj_pl.x, 380, 1);
44
            break;
45
        case 8:
46
            cutscene_wait(0.5);
47
            break;
48
        case 9:
49
            cutscene_npc_walk(actor_ceroba, 223, 360, 1, "x", "up");
50
            break;
51
        case 10:
52
            cutscene_wait(0.5);
53
            break;
54
        case 11:
55
            cutscene_dialogue();
56
            with (msg)
57
            {
58
                talker[0] = 1161;
59
                message[0] = "* There's some kinda#  console here.";
60
                message[1] = "* Maybe one of Chujin's#  codes will work? Just#  give me a second.";
61
                message[2] = "* In the meantime, you#  can... wait over in the#  corner or something.";
62
                prt[0] = 370;
63
                prt[1] = 370;
64
                prt[2] = 377;
65
            }
66
            break;
67
        case 12:
68
            cutscene_camera_move(obj_pl.x, obj_pl.y, 3);
69
            break;
70
        case 13:
71
            instance_destroy(obj_player_npc);
72
            instance_destroy(obj_camera);
73
            global.sworks_flag[0] = 3;
74
            scr_cutscene_end
scr_cutscene_end

function scr_cutscene_end() { global.cutscene = false; obj_pl.alarm[0] = 1; }
();
75
            cutscene_advance();
76
            __view_set(e__VW.Object, 0, obj_pl);
77
            break;
78
    }
79
}
80
with (actor_ceroba)
81
{
82
    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))
83
    {
84
        scr_text
scr_text

function scr_text() { if (!instance_exists(obj_dialogue)) msg = instance_create(x, y, obj_dialogue); }
();
85
        switch (global.sworks_flag[1])
86
        {
87
            case 0:
88
                with (msg)
89
                {
90
                    talker[0] = 1161;
91
                    message[0] = "* I need to concentrate#  right now.";
92
                    prt[0] = 370;
93
                }
94
                break;
95
            case 1:
96
                with (msg)
97
                {
98
                    talker[0] = 1161;
99
                    message[0] = "* I think I'm getting#  somewhere. Hold on.";
100
                    prt[0] = 370;
101
                }
102
                break;
103
            case 2:
104
                with (msg)
105
                {
106
                    talker[0] = 1161;
107
                    message[0] = "* Almost got it! Didn't#  think this would#  actually work!";
108
                    prt[0] = 370;
109
                }
110
                break;
111
        }
112
    }
113
}
114
if (global.sworks_flag[1] == 3)
115
{
116
    switch (scene)
117
    {
118
        case 0:
119
            instance_create(obj_ceroba_npc.x, 300, obj_camera);
120
            obj_camera.move = false;
121
            __view_set(e__VW.Object, 0, obj_camera);
122
            audio_stop_sound(snd_machinery);
123
            obj_steamworks_04_generator.image_speed = 0;
124
            cutscene_advance();
125
            break;
126
        case 1:
127
            cutscene_wait(2);
128
            break;
129
        case 2:
130
            obj_steamworks_04_generator.image_speed = 1/3;
131
            audio_play_sound(snd_generator_start, 1, 0);
132
            var rumble_sound = audio_play_sound(snd_machinery, 1, 0);
133
            audio_sound_gain(rumble_sound, 0, 0);
134
            audio_sound_gain(rumble_sound, 1, 1500);
135
            instance_create(obj_ceroba_npc.x, obj_ceroba_npc.y - 35, obj_cutscene_ex);
136
            cutscene_advance();
137
            break;
138
        case 3:
139
            cutscene_wait(2.5);
140
            break;
141
        case 4:
142
            cutscene_change_room(152, 655, 170, 0.05);
143
            break;
144
    }
145
}
146
if (global.sworks_flag[1] == 4)
147
{
148
    switch (scene)
149
    {
150
        case 0:
151
            __view_set(e__VW.Object, 0, obj_ceroba_npc);
152
            cutscene_advance();
153
            break;
154
        case 1:
155
            cutscene_instance_create(330, 200, 1168);
156
            break;
157
        case 2:
158
            cutscene_npc_walk(1168, 300, obj_ceroba_npc.y, 3, "y", "left", false);
159
            break;
160
        case 3:
161
            cutscene_npc_direction(1161, "right");
162
            break;
163
        case 4:
164
            cutscene_wait(0.5);
165
            break;
166
        case 5:
167
            cutscene_dialogue();
168
            with (msg)
169
            {
170
                talker[0] = 1161;
171
                message[0] = "* It's working!";
172
                message[1] = "* Wait... What have you#  been up to?";
173
                prt[0] = 372;
174
                prt[1] = 393;
175
            }
176
            break;
177
        case 6:
178
            cutscene_wait(0.5);
179
            break;
180
        case 7:
181
            cutscene_npc_direction(1161, "up");
182
            break;
183
        case 8:
184
            cutscene_wait(0.5);
185
            break;
186
        case 9:
187
            cutscene_npc_direction(1161, "down");
188
            break;
189
        case 10:
190
            cutscene_wait(0.5);
191
            break;
192
        case 11:
193
            cutscene_npc_direction(1161, "left");
194
            break;
195
        case 12:
196
            cutscene_wait(0.5);
197
            break;
198
        case 13:
199
            cutscene_npc_direction(1161, "right");
200
            break;
201
        case 14:
202
            cutscene_wait(0.5);
203
            break;
204
        case 15:
205
            cutscene_dialogue();
206
            with (msg)
207
            {
208
                talker[0] = 1161;
209
                message[0] = "* Oh...";
210
                message[1] = "* I... wasn't actually#  doing anything this#  whole time was I?";
211
                message[2] = "* Ugh, alright. You're#  clearly more capable of#  problem solving.";
212
                message[3] = "* I suppose you should#  lead the way from now#  on.";
213
                message[4] = "* Just head west from#  here and we'll reach#  Hotland eventually.";
214
                prt[0] = 377;
215
                prt[1] = 382;
216
                prt[2] = 384;
217
                prt[3] = 377;
218
                prt[4] = 377;
219
            }
220
            break;
221
        case 16:
222
            ceroba_x_dest = obj_player_npc.x + 20;
223
            ceroba_end_dir = "left";
224
            cutscene_advance();
225
            break;
226
        case 17:
227
            cutscene_npc_walk(1161, ceroba_x_dest, obj_player_npc.y, 3, "y", ceroba_end_dir);
228
            break;
229
        case 18:
230
            cutscene_camera_move(obj_pl.x, obj_pl.y, 2);
231
            break;
232
        case 19:
233
            obj_pl.image_alpha = 1;
234
            __view_set(e__VW.Object, 0, obj_pl);
235
            instance_destroy(obj_player_npc);
236
            global.party_member = 1171;
237
            scr_actor_into_follower
scr_actor_into_follower

function scr_actor_into_follower(arg0, arg1) { if (!instance_exists(arg0)) return false; if (arg1 == -4) return false; instance_create(arg0.x, arg0.y, arg1); arg1.x = arg0.x; arg1.y = arg0.y; with (arg0) { switch (npc_direction) { case "up": arg1.sprite_index = arg1.up_sprite_idle; break; case "down": arg1.sprite_index = arg1.down_sprite_idle; break; case "left": arg1.sprite_index = arg1.left_sprite_idle; break; case "right": arg1.sprite_index = arg1.right_sprite_idle; break; } } instance_destroy(arg0); }
(1161, 1171);
238
            global.sworks_flag[1] = 5;
239
            scr_cutscene_end
scr_cutscene_end

function scr_cutscene_end() { global.cutscene = false; obj_pl.alarm[0] = 1; }
();
240
            break;
241
    }
242
}
243
244
enum e__VW
245
{
246
    XView,
247
    YView,
248
    WView,
249
    HView,
250
    Angle,
251
    HBorder,
252
    VBorder,
253
    HSpeed,
254
    VSpeed,
255
    Object,
256
    Visible,
257
    XPort,
258
    YPort,
259
    WPort,
260
    HPort,
261
    Camera,
262
    SurfaceID
263
}