Undertale Yellow script viewer

← back to main script listing

gml_Object_obj_steamworks_22_controller_neutral_Step_0

(view raw script w/o annotations or w/e)
1
switch (scene)
2
{
3
    case 0:
4
        if (obj_pl.x <= 1820)
5
        {
6
            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; }
();
7
            cutscene_advance();
8
        }
9
        break;
10
    case 1:
11
        instance_create_depth(obj_pl.x, 20, 850, obj_steamworks_22_energy_ball_fake);
12
        cutscene_advance();
13
        break;
14
    case 2:
15
        if (!instance_exists(obj_steamworks_22_energy_ball_fake))
16
        {
17
            audio_play_sound(snd_axis_energy_ball_explode, 1, 0);
18
            audio_play_sound(snd_glass_break_2, 1, 0);
19
            layer_set_visible("asset_broken_glass", true);
20
            layer_set_visible("asset_glass_flash", true);
21
            layer_set_visible("asset_glass_panel", false);
22
            alarm[0] = 1;
gml_Object_obj_steamworks_22_controller_neutral_Alarm_0.gml

layer_set_visible("asset_glass_flash", false);
23
            scr_screenshake
scr_screenshake

function scr_screenshake(arg0, arg1) { if (instance_exists(obj_screenshake_player)) exit; with (instance_create(__view_get(e__VW.Object, 0).x, __view_get(e__VW.Object, 0).y, obj_screenshake_player)) { alarm[0]
gml_Object_obj_steamworks_22_controller_neutral_Alarm_0.gml

layer_set_visible("asset_glass_flash", false);
intensity = arg1; } } enum e__VW { XView, YView, WView, HView, Angle, HBorder, VBorder, HSpeed, VSpeed, Object, Visible, XPort, YPort, WPort, HPort, Camera, SurfaceID }
(10, 2);
24
            cutscene_advance();
25
        }
26
        break;
27
    case 3:
28
        obj_pl.direction = 90;
29
        cutscene_advance();
30
        break;
31
    case 4:
32
        cutscene_wait(1);
33
        break;
34
    case 5:
35
        layer_set_visible("asset_broken_glass", false);
36
        cutscene_advance();
37
        break;
38
    case 6:
39
        cutscene_instance_create(0, 0, 577);
40
        break;
41
    case 7:
42
        cutscene_wait(1);
43
        break;
44
    case 8:
45
        cutscene_instance_create(1690, 40, 1166);
46
        obj_axis_npc.npc_dynamic_depth = false;
47
        obj_axis_npc.depth = layer_get_depth("tiles_outside") - 50;
48
        break;
49
    case 9:
50
        cutscene_npc_walk(1166, 1690, 90, 3, "y", "down");
51
        break;
52
    case 10:
53
        cutscene_dialogue();
54
        with (msg)
55
        {
56
            talker[0] = 1166;
57
            message[0] = "* FOUND YOU.";
58
            prt[0] = 2916;
59
        }
60
        break;
61
    case 11:
62
        cutscene_music_start(627);
63
        break;
64
    case 12:
65
        instance_create_depth(obj_axis_npc.x, obj_axis_npc.y, layer_get_depth("tiles_outside") - 50, obj_steamworks_22_axis_throwing);
66
        instance_destroy(obj_axis_npc);
67
        cutscene_advance();
68
        break;
69
    case 13:
70
        scr_cutscene_end
scr_cutscene_end

function scr_cutscene_end() { global.cutscene = false; obj_pl.alarm[0] = 1; }
();
71
        cutscene_camera_move(obj_pl.x, obj_pl.y, 1);
72
        dynamic_wall = instance_create(camera_get_view_x(view_camera[0]) + camera_get_view_width(view_camera[0]), 0, obj_wall);
73
        dynamic_wall.image_yscale = 12;
74
        global.sworks_flag[13] = 1;
75
        cutscene_advance(14);
76
        break;
77
    case 14:
78
        obj_camera.move = false;
79
        if (obj_pl.x < obj_camera.x)
80
            obj_camera.x = obj_pl.x;
81
        dynamic_wall.x = camera_get_view_x(view_camera[0]) + camera_get_view_width(view_camera[0]);
82
        if (obj_pl.x < 540)
83
        {
84
            obj_steamworks_22_axis_throwing.alarm[0] = -1;
85
            instance_create(obj_pl.x, obj_pl.y, obj_player_npc);
86
            obj_player_npc.left_sprite = 17;
87
            cutscene_npc_walk(1168, 60, 140, 5, "x", "right", 1161);
88
            cutscene_advance();
89
        }
90
        break;
91
    case 15:
92
        obj_camera.x = obj_pl.x;
93
        if (obj_player_npc.npc_arrived == true)
94
        {
95
            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, 500);
96
            cutscene_camera_reset();
97
        }
98
        break;
99
    case 16:
100
        cutscene_wait(1);
101
        break;
102
    case 17:
103
        cutscene_instance_create(360, 140, 1166);
104
        break;
105
    case 18:
106
        cutscene_npc_walk(1166, 240, 140, 4, "x", "left");
107
        break;
108
    case 19:
109
        cutscene_wait(0.5);
110
        break;
111
    case 20:
112
        cutscene_music_start(219);
113
        break;
114
    case 21:
115
        cutscene_npc_action_sprite(1166, 2693, 1, true);
116
        break;
117
    case 22:
118
        cutscene_npc_action_sprite(1166, 3312, 1, true, 1);
119
        cutscene_advance(23);
120
        break;
121
    case 23:
122
        cutscene_dialogue();
123
        with (msg)
124
        {
125
            talker[0] = 1166;
126
            message[0] = "* YOU ARE CORNERED,#  HUMAN.";
127
            message[1] = "* I DID NOT WANT TO HURT#  YOU BUT YOU FORCED MY#  GLOVE.";
128
            message[2] = "* PREPARE FOR PAIN.";
129
            prt[0] = 473;
130
            prt[1] = 473;
131
            prt[2] = 473;
132
        }
133
        break;
134
    case 24:
135
        cutscene_audio_fade(cutscene_music, 0, 500, 0.15, false, true);
136
        break;
137
    case 25:
138
        cutscene_instance_create(-10, 90, 2468);
139
        with (obj_steamworks_22_pellet)
140
        {
141
            depth = -9999;
142
            direction = point_direction(x, y, obj_axis_npc.x, obj_axis_npc.y - 27);
143
            speed = 8;
144
        }
145
        audio_play_sound(snd_undertale_swoosh, 1, 0);
146
        break;
147
    case 26:
148
        with (obj_steamworks_22_pellet)
149
        {
150
            if (x >= obj_axis_npc.x)
151
            {
152
                instance_create_depth(obj_axis_npc.x, obj_axis_npc.y - 27, -999, part_axis_ball_destroy);
153
                audio_play_sound(snd_axis_energy_ball_explode, 1, 0);
154
                instance_create_depth(0, 0, -9999, obj_steamworks_22_ball_flash);
155
                instance_destroy(obj_steamworks_22_energy_ball_fake_2);
156
                audio_play_sound(snd_undertale_explosion, 1, 0);
157
                layer_set_visible("rubble", false);
158
                instance_destroy(obj_steamworks_22_pellet);
159
                other.scene = 27;
160
            }
161
        }
162
        break;
163
    case 27:
164
        cutscene_npc_action_sprite(1166, 3170, 1, true, 0);
165
        break;
166
    case 28:
167
        cutscene_wait(2);
168
        break;
169
    case 29:
170
        cutscene_dialogue();
171
        with (msg)
172
        {
173
            talker[0] = 1166;
174
            message[0] = "* OH.";
175
            prt[0] = 473;
176
        }
177
        break;
178
    case 30:
179
        cutscene_wait(1);
180
        break;
181
    case 31:
182
        cutscene_dialogue();
183
        with (msg)
184
        {
185
            talker[0] = 1166;
186
            message[0] = "* THIS IS A PROBLEM.";
187
            message[1] = "* LOOKS LIKE YOU WIN THIS#  TIME.";
188
            message[2] = "* I WILL RETURN TO#  CAPTURE YOU SOON.";
189
            message[3] = "* DO NOT GO ANYWHERE,#  PLEASE.";
190
            prt[0] = 3332;
191
            prt[1] = 473;
192
            prt[2] = 473;
193
            prt[3] = 473;
194
        }
195
        break;
196
    case 32:
197
        cutscene_npc_action_sprite(1166, 3571, 1, true, 0, 60, 0);
198
        break;
199
    case 33:
200
        cutscene_npc_action_sprite(1166, 3319, 1, false, 0);
201
        cutscene_advance();
202
        break;
203
    case 34:
204
        obj_axis_npc.x += 1;
205
        if (obj_axis_npc.x > 340)
206
            cutscene_advance();
207
        break;
208
    case 35:
209
        cutscene_wait(1);
210
        break;
211
    case 36:
212
        instance_destroy(obj_axis_npc);
213
        instance_destroy(dynamic_wall);
214
        global.sworks_flag[13] = 2;
215
        cutscene_end();
216
        break;
217
}