| 1 |
switch (scene) |
| 2 |
{ |
| 3 |
case 0: |
| 4 |
if (keyboard_multicheck_pressed(0) && scr_interactscr_interactfunction 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;
}
} ()) |
| 5 |
{ |
| 6 |
scr_cutscene_start(); |
| 7 |
cutscene_advance(); |
| 8 |
} |
| 9 |
break; |
| 10 |
case 1: |
| 11 |
cutscene_dialogue(); |
| 12 |
with (msg) |
| 13 |
{ |
| 14 |
sndfnt = 108; |
| 15 |
message[0] = "* (You figured out a# code?)"; |
| 16 |
message[1] = "* (Hurry and give it a# try!)"; |
| 17 |
prt[0] = 370; |
| 18 |
prt[1] = 370; |
| 19 |
} |
| 20 |
break; |
| 21 |
case 2: |
| 22 |
if (!instance_exists(obj_factory_numpad_overlay)) |
| 23 |
instance_create(0, 0, obj_factory_numpad_overlay); |
| 24 |
scene++; |
| 25 |
break; |
| 26 |
case 3: |
| 27 |
if (obj_factory_numpad_overlay.entry_correct == 1) |
| 28 |
scene = 7; |
| 29 |
else if (obj_factory_numpad_overlay.entry_correct == 0) |
| 30 |
scene = 5; |
| 31 |
break; |
| 32 |
case 5: |
| 33 |
if (instance_exists(obj_factory_numpad_overlay)) |
| 34 |
exit; |
| 35 |
cutscene_dialogue(); |
| 36 |
with (msg) |
| 37 |
{ |
| 38 |
sndfnt = 108; |
| 39 |
message[0] = "* (Try something else!# Come on!)"; |
| 40 |
prt[0] = 370; |
| 41 |
} |
| 42 |
break; |
| 43 |
case 6: |
| 44 |
scene = 0; |
| 45 |
scr_cutscene_end(); |
| 46 |
break; |
| 47 |
case 7: |
| 48 |
if (instance_exists(obj_factory_numpad_overlay)) |
| 49 |
exit; |
| 50 |
cutscene_wait(1); |
| 51 |
break; |
| 52 |
case 7.5: |
| 53 |
instance_destroy(obj_factory_03_minigame); |
| 54 |
if (obj_axis_npc.x > 400) |
| 55 |
{ |
| 56 |
if (cutscene_npc_walk(1166, 400, obj_axis_npc.y, 4, "x", "left")) |
| 57 |
cutscene_advance(8); |
| 58 |
} |
| 59 |
else |
| 60 |
{ |
| 61 |
cutscene_advance(8); |
| 62 |
} |
| 63 |
break; |
| 64 |
case 8: |
| 65 |
instance_create(obj_pl.x, obj_pl.y, obj_player_npc); |
| 66 |
cutscene_follower_into_actor(); |
| 67 |
audio_play_sound(snd_electric_flash, 1, 0); |
| 68 |
obj_factory_03_axis_flashlight.active = -1; |
| 69 |
break; |
| 70 |
case 9: |
| 71 |
cutscene_wait(0.25); |
| 72 |
break; |
| 73 |
case 10: |
| 74 |
audio_play_sound(snd_electric_flash, 1, 0); |
| 75 |
if (obj_factory_03_axis_flashlight.active == -1) |
| 76 |
obj_factory_03_axis_flashlight.active = 0; |
| 77 |
else |
| 78 |
obj_factory_03_axis_flashlight.active = -1; |
| 79 |
flash_count--; |
| 80 |
if (flash_count <= 0 && obj_factory_03_axis_flashlight.active == -1) |
| 81 |
{ |
| 82 |
scene = 11; |
| 83 |
instance_destroy(obj_factory_03_axis_flashlight); |
| 84 |
} |
| 85 |
else |
| 86 |
{ |
| 87 |
scene = 9; |
| 88 |
} |
| 89 |
break; |
| 90 |
case 11: |
| 91 |
if (cutscene_wait(1)) |
| 92 |
{ |
| 93 |
layer_set_visible("door_visible", true); |
| 94 |
audio_play_sound(snd_sliding_door_open, 1, 0); |
| 95 |
scr_audio_fade_outscr_audio_fade_outfunction 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;
} (obj_radio.current_song, 500); |
| 96 |
} |
| 97 |
break; |
| 98 |
case 12: |
| 99 |
cutscene_wait(0.5); |
| 100 |
break; |
| 101 |
case 13: |
| 102 |
cutscene_npc_walk(1161, obj_pl.x - 30, obj_pl.y, 3, "x", "right"); |
| 103 |
if (obj_ceroba_npc.x < obj_player_npc.x) |
| 104 |
obj_player_npc.npc_direction = "left"; |
| 105 |
break; |
| 106 |
case 14: |
| 107 |
cutscene_dialogue(); |
| 108 |
with (msg) |
| 109 |
{ |
| 110 |
skippable = false; |
| 111 |
talker[0] = 1161; |
| 112 |
message[0] = "* Okay! Let's head# upstairs before Axis- "; |
| 113 |
prt[0] = 377; |
| 114 |
if (cutoff >= string_length(message[message_current])) |
| 115 |
{ |
| 116 |
other.scene++; |
| 117 |
global.dialogue_open = false; |
| 118 |
instance_destroy(); |
| 119 |
} |
| 120 |
} |
| 121 |
break; |
| 122 |
case 15: |
| 123 |
with (obj_factory_03_minigame) |
| 124 |
instance_destroy(); |
| 125 |
with (obj_axis_npc) |
| 126 |
{ |
| 127 |
can_walk = false; |
| 128 |
y = 760; |
| 129 |
x = 480; |
| 130 |
npc_direction = "right"; |
| 131 |
} |
| 132 |
cutscene_camera_move(620, obj_pl.y, 5); |
| 133 |
break; |
| 134 |
case 16: |
| 135 |
cutscene_wait(0.7); |
| 136 |
break; |
| 137 |
case 17: |
| 138 |
cutscene_dialogue(); |
| 139 |
with (msg) |
| 140 |
{ |
| 141 |
talker[0] = 1166; |
| 142 |
talker[1] = 1161; |
| 143 |
talker[4] = 1166; |
| 144 |
talker[7] = 1161; |
| 145 |
talker[9] = 1166; |
| 146 |
talker[13] = 1161; |
| 147 |
talker[14] = 1166; |
| 148 |
talker[15] = 1161; |
| 149 |
talker[16] = 1166; |
| 150 |
talker[17] = 1161; |
| 151 |
talker[19] = 1166; |
| 152 |
talker[20] = 1161; |
| 153 |
message[0] = "* HELLO."; |
| 154 |
message[1] = "* Axis!"; |
| 155 |
message[2] = "* ...Juuust the bot I was# looking for!"; |
| 156 |
message[3] = "* How are you doing these# days?"; |
| 157 |
message[4] = "* NOT SO GOOD."; |
| 158 |
message[5] = "* I COULD ONLY SPEAK IN 15# CHARACTERS (max) BACK# THERE."; |
| 159 |
message[6] = "* IT KIND OF BUMMED ME# OUT."; |
| 160 |
message[7] = "* I'm sorry to hear that."; |
| 161 |
message[8] = "* Glad you got your full# speech ability back."; |
| 162 |
message[9] = "* THANK YOU. I DO LIKE# TALKING."; |
| 163 |
message[10] = "* WAIT."; |
| 164 |
message[11] = "* WAIT????"; |
| 165 |
message[12] = "* ARE YOU TRYING TO# DISTRACT ME FROM MY# MISSION."; |
| 166 |
message[13] = "* No."; |
| 167 |
message[14] = "* OH OKAY."; |
| 168 |
message[15] = "* Can I ask you a question# involving the security# of the Steamworks?"; |
| 169 |
message[16] = "* YES I AM A SECURITY# EXPERT."; |
| 170 |
message[17] = "* Why is it that some# doors require a passcode# to unlock..."; |
| 171 |
message[18] = "* And others require a# Steamworks ID?"; |
| 172 |
message[19] = "* TWO-FACTOR# AUTHENTICATION."; |
| 173 |
message[20] = "* Huh..."; |
| 174 |
prt[0] = 473; |
| 175 |
prt[1] = 381; |
| 176 |
prt[2] = 3754; |
| 177 |
prt[3] = 3754; |
| 178 |
prt[4] = 473; |
| 179 |
prt[5] = 473; |
| 180 |
prt[6] = 473; |
| 181 |
prt[7] = 377; |
| 182 |
prt[8] = 370; |
| 183 |
prt[9] = 473; |
| 184 |
prt[10] = 473; |
| 185 |
prt[11] = 473; |
| 186 |
prt[12] = 473; |
| 187 |
prt[13] = 370; |
| 188 |
prt[14] = 473; |
| 189 |
prt[15] = 370; |
| 190 |
prt[16] = 473; |
| 191 |
prt[17] = 377; |
| 192 |
prt[18] = 370; |
| 193 |
prt[19] = 473; |
| 194 |
prt[20] = 370; |
| 195 |
if (message_current == 1) |
| 196 |
{ |
| 197 |
obj_ceroba_npc.npc_direction = "left"; |
| 198 |
if (!audio_is_playing(mus_enter_axis)) |
| 199 |
other.cutscene_music = audio_play_sound(mus_enter_axis, 1, 1); |
| 200 |
} |
| 201 |
if (message_current == 19) |
| 202 |
audio_stop_sound(other.cutscene_music); |
| 203 |
} |
| 204 |
break; |
| 205 |
case 18: |
| 206 |
cutscene_wait(1.5); |
| 207 |
break; |
| 208 |
case 19: |
| 209 |
cutscene_dialogue(); |
| 210 |
with (msg) |
| 211 |
{ |
| 212 |
talker[0] = 1166; |
| 213 |
talker[1] = 1161; |
| 214 |
message[0] = "* . . ."; |
| 215 |
message[1] = "* . . ."; |
| 216 |
prt[0] = 473; |
| 217 |
prt[1] = 371; |
| 218 |
} |
| 219 |
break; |
| 220 |
case 20: |
| 221 |
cutscene_wait(1); |
| 222 |
break; |
| 223 |
case 21: |
| 224 |
cutscene_npc_set_sprites(1168, 15, 16, 18, 17, 24, 21, 23, 22); |
| 225 |
break; |
| 226 |
case 22: |
| 227 |
cutscene_npc_set_sprites(1161, 81, 80, 78, 79, 61, 65, 60, 63); |
| 228 |
break; |
| 229 |
case 23: |
| 230 |
cutscene_npc_walk(1168, 740, 710, 4, "x", "up"); |
| 231 |
cutscene_advance(); |
| 232 |
break; |
| 233 |
case 24: |
| 234 |
cutscene_npc_walk(1161, 740, 710, 4, "x", "up"); |
| 235 |
cutscene_advance(); |
| 236 |
break; |
| 237 |
case 25: |
| 238 |
with (obj_player_npc) |
| 239 |
{ |
| 240 |
if (y <= 755 && image_alpha > 0) |
| 241 |
image_alpha -= 0.2; |
| 242 |
} |
| 243 |
with (obj_ceroba_npc) |
| 244 |
{ |
| 245 |
if (y <= 755 && image_alpha > 0) |
| 246 |
image_alpha -= 0.2; |
| 247 |
} |
| 248 |
if (obj_ceroba_npc.image_alpha <= 0 && obj_player_npc.image_alpha <= 0) |
| 249 |
{ |
| 250 |
layer_set_visible("door_visible", false); |
| 251 |
audio_play_sound(snd_undertale_thud, 1, 0); |
| 252 |
scr_screenshakescr_screenshakefunction 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]
intensity = arg1;
}
}
enum e__VW
{
XView,
YView,
WView,
HView,
Angle,
HBorder,
VBorder,
HSpeed,
VSpeed,
Object,
Visible,
XPort,
YPort,
WPort,
HPort,
Camera,
SurfaceID
} (8, 2.5); |
| 253 |
cutscene_advance(); |
| 254 |
} |
| 255 |
break; |
| 256 |
case 26: |
| 257 |
cutscene_wait(2.5); |
| 258 |
break; |
| 259 |
case 27: |
| 260 |
cutscene_dialogue(); |
| 261 |
with (msg) |
| 262 |
{ |
| 263 |
talker[0] = 1166; |
| 264 |
message[0] = "* COOL."; |
| 265 |
prt[0] = 473; |
| 266 |
} |
| 267 |
break; |
| 268 |
case 28: |
| 269 |
global.sworks_flag[37] = 3; |
| 270 |
cutscene_change_room(240, 400, 760, 0.03); |
| 271 |
break; |
| 272 |
} |