1 |
switch scene |
2 |
{ |
3 |
case 0: |
4 |
if (scr_interactscr_interactfunction 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)) |
5 |
cutscene_advance() |
6 |
break |
7 |
case 1: |
8 |
scr_cutscene_startscr_cutscene_startfunction 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
} () |
9 |
cutscene_advance() |
10 |
break |
11 |
case 2: |
12 |
cutscene_sfx_play(snd_switch, 1) |
13 |
break |
14 |
case 3: |
15 |
image_speed = 0.25 |
16 |
cutscene_advance() |
17 |
break |
18 |
case 4: |
19 |
if (image_index >= (image_number - 1)) |
20 |
{ |
21 |
cutscene_advance() |
22 |
image_speed = 0 |
23 |
} |
24 |
break |
25 |
case 5: |
26 |
cutscene_sfx_play(snd_undertale_thud, 1) |
27 |
break |
28 |
case 6: |
29 |
cutscene_screenshake(1, 2) |
30 |
break |
31 |
case 7: |
32 |
cutscene_wait(0.5) |
33 |
break |
34 |
case 8: |
35 |
obj_pl.direction = 0 |
36 |
cutscene_advance() |
37 |
break |
38 |
case 9: |
39 |
layer_vspeed("ast_shortcut", 2) |
40 |
cutscene_advance() |
41 |
break |
42 |
case 10: |
43 |
if (layer_get_y("ast_shortcut") >= 0) |
44 |
{ |
45 |
cutscene_advance() |
46 |
layer_vspeed("ast_shortcut", 0) |
47 |
audio_play_sound(snd_elevator_start, 1, 0) |
48 |
layer_set_visible("ast_shortcut_railing", true) |
49 |
scr_screenshakescr_screenshakefunction scr_screenshake(argument0, argument1) //gml_Script_scr_screenshake
{
if instance_exists(obj_screenshake_player)
return;
with (instance_create(__view_get((9 << 0), 0).x, __view_get((9 << 0), 0).y, obj_screenshake_player))
{
alarm[0]
intensity = argument1
}
} (15, 2) |
50 |
} |
51 |
break |
52 |
case 11: |
53 |
global.sworks_flag[19] = 1 |
54 |
cutscene_advance() |
55 |
break |
56 |
case 12: |
57 |
instance_deactivate_layer("colliders_nobridge") |
58 |
instance_activate_layer("colliders_bridge") |
59 |
cutscene_advance() |
60 |
break |
61 |
case 13: |
62 |
scene = -1 |
63 |
scr_cutscene_end() |
64 |
break |
65 |
} |