Undertale Yellow script viewer

← back to main script listing

gml_Object_obj_steamworks_13_axis_door_Step_0

(view raw script w/o annotations or w/e)
1
with (obj_robuild_parent)
2
{
3
    if (robot_item_is_carried == true)
4
        exit;
5
}
6
if (global.sworks_flag[6] == 0)
7
{
8
    switch (scene)
9
    {
10
        case 0:
11
            if (place_meeting(x, y, obj_pl))
12
            {
13
                obj_pl.direction = 180;
14
                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; }
();
15
                cutscene_advance();
16
                if (global.route == 2)
17
                    obj_ceroba_npc.npc_direction = "right";
18
            }
19
            break;
20
        case 1:
21
            cutscene_dialogue();
22
            with (msg)
23
            {
24
                talker[0] = 1161;
25
                message[0] = "* Hold on! That's far too#  easy of an escape.";
26
                message[1] = "* Don't be reckless,#  we'll find another way#  out.";
27
                prt[0] = 381;
28
                prt[1] = 377;
29
            }
30
            break;
31
        case 2:
32
            obj_ceroba_npc.npc_direction = "down";
33
            cutscene_advance();
34
            break;
35
        case 3:
36
            cutscene_instance_create(obj_pl.x, obj_pl.y, 1168);
37
            break;
38
        case 4:
39
            cutscene_npc_walk_relative(1168, 0, 40, 3, "y", "down");
40
            break;
41
        case 5:
42
            with (obj_player_npc)
43
            {
44
                if (!place_free(x, y))
45
                {
46
                    other.scene = 4;
47
                    exit;
48
                }
49
            }
50
            instance_destroy(obj_player_npc);
51
            scr_cutscene_end
scr_cutscene_end

function scr_cutscene_end() { global.cutscene = false; obj_pl.alarm[0] = 1; }
();
52
            cutscene_advance();
53
            break;
54
        case 6:
55
            if (place_meeting(x, y, obj_pl))
56
            {
57
                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; }
();
58
                cutscene_change_room(161, 160, 280, 0.1);
59
            }
60
            break;
61
    }
62
}
63
if (global.sworks_flag[6] == 1)
64
{
65
    switch (scene)
66
    {
67
        case 0:
68
            cutscene_wait(1);
69
            break;
70
        case 1:
71
            if (global.route != 2)
72
            {
73
                global.sworks_flag[6] = 2;
74
                scr_cutscene_end
scr_cutscene_end

function scr_cutscene_end() { global.cutscene = false; obj_pl.alarm[0] = 1; }
();
75
                scene = 0;
76
                exit;
77
            }
78
            obj_ceroba_npc.npc_direction_hold = "down";
79
            obj_ceroba_npc.npc_direction = "right";
80
            cutscene_dialogue();
81
            with (msg)
82
            {
83
                talker[0] = 1161;
84
                message[0] = "* Wow, he caught you.#  Shocker.";
85
                prt[0] = 384;
86
            }
87
            break;
88
        case 2:
89
            global.sworks_flag[6] = 2;
90
            scr_cutscene_end
scr_cutscene_end

function scr_cutscene_end() { global.cutscene = false; obj_pl.alarm[0] = 1; }
();
91
            scene = 0;
92
            break;
93
    }
94
}
95
if (global.sworks_flag[6] == 2)
96
{
97
    if (place_meeting(x, y, obj_pl))
98
    {
99
        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; }
();
100
        cutscene_change_room(161, 160, 280, 0.1);
101
    }
102
}
103
if (global.sworks_flag[6] == 3)
104
{
105
    switch (scene)
106
    {
107
        case 0:
108
            cutscene_wait(1);
109
            break;
110
        case 1:
111
            if (global.route != 2)
112
            {
113
                global.sworks_flag[6] = 4;
114
                scr_cutscene_end
scr_cutscene_end

function scr_cutscene_end() { global.cutscene = false; obj_pl.alarm[0] = 1; }
();
115
                scene = 0;
116
                exit;
117
            }
118
            obj_ceroba_npc.npc_direction_hold = "down";
119
            obj_ceroba_npc.npc_direction = "right";
120
            cutscene_dialogue();
121
            with (msg)
122
            {
123
                talker[0] = 1161;
124
                message[0] = "* What are you trying to#  accomplish?";
125
                message[1] = "* Come on, stick to the#  plan!";
126
                prt[0] = 366;
127
                prt[1] = 368;
128
            }
129
            break;
130
        case 2:
131
            global.sworks_flag[6] = 4;
132
            scr_cutscene_end
scr_cutscene_end

function scr_cutscene_end() { global.cutscene = false; obj_pl.alarm[0] = 1; }
();
133
            scene = 0;
134
            break;
135
    }
136
}
137
if (global.sworks_flag[6] == 4)
138
{
139
    switch (scene)
140
    {
141
        case 0:
142
            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))
143
            {
144
                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; }
();
145
                cutscene_advance();
146
            }
147
            break;
148
        case 1:
149
            cutscene_sfx_play(364, 1);
150
            break;
151
        case 2:
152
            cutscene_wait(1);
153
            break;
154
        case 3:
155
            cutscene_dialogue();
156
            with (msg)
157
                message[0] = "* (The door is locked.)";
158
            break;
159
        case 4:
160
            cutscene_advance();
161
            break;
162
        case 5:
163
            if (global.party_member != -4)
164
            {
165
                cutscene_advance(7);
166
                exit;
167
            }
168
            cutscene_instance_create(obj_pl.x, obj_pl.y, 1168);
169
            break;
170
        case 6:
171
            cutscene_npc_walk_relative(1168, 0, 40, 3, "y", "down");
172
            break;
173
        case 7:
174
            with (obj_player_npc)
175
            {
176
                if (!place_free(x, y))
177
                {
178
                    other.scene = 6;
179
                    exit;
180
                }
181
            }
182
            instance_destroy(obj_player_npc);
183
            scr_cutscene_end
scr_cutscene_end

function scr_cutscene_end() { global.cutscene = false; obj_pl.alarm[0] = 1; }
();
184
            cutscene_advance(0);
185
            break;
186
    }
187
}