1 |
if live_call() |
2 |
return global.live_result; |
3 |
switch scene |
4 |
{ |
5 |
case 0: |
6 |
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)) |
7 |
{ |
8 |
if (global.sworks_flag[55] == 0) |
9 |
{ |
10 |
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
} () |
11 |
cutscene_advance() |
12 |
} |
13 |
else |
14 |
{ |
15 |
scr_textscr_textfunction scr_text() //gml_Script_scr_text
{
if (!instance_exists(obj_dialogue))
msg = instance_create(x, y, obj_dialogue)
} () |
16 |
with (msg) |
17 |
message[0] = "* (The door is already# open.)" |
18 |
} |
19 |
} |
20 |
break |
21 |
case 1: |
22 |
cutscene_dialogue() |
23 |
with (msg) |
24 |
{ |
25 |
message[0] = "* (Swipe your ID?)" |
26 |
ch_msg = 0 |
27 |
ch[1] = "Yes" |
28 |
ch[2] = "No" |
29 |
if (outcome == 1) |
30 |
other.scene++ |
31 |
else if (outcome == 2) |
32 |
{ |
33 |
audio_play_sound(snd_fail, 1, 0) |
34 |
other.scene = 0 |
35 |
scr_cutscene_end() |
36 |
} |
37 |
} |
38 |
break |
39 |
case 2: |
40 |
instance_create_depth(0, 0, -999, obj_sworks_id) |
41 |
obj_sworks_id.end_cutscene = false |
42 |
cutscene_advance() |
43 |
break |
44 |
case 3: |
45 |
if (!instance_exists(obj_sworks_id)) |
46 |
cutscene_advance() |
47 |
break |
48 |
case 4: |
49 |
cutscene_wait(0.5) |
50 |
break |
51 |
case 5: |
52 |
cutscene_advance() |
53 |
break |
54 |
case 6: |
55 |
cutscene_wait(0.5) |
56 |
break |
57 |
case 7: |
58 |
obj_pl.direction = 270 |
59 |
audio_sound_gain(obj_radio.current_song, 0.25, 1000) |
60 |
cutscene_advance() |
61 |
break |
62 |
case 8: |
63 |
cutscene_wait(0.5) |
64 |
break |
65 |
case 9: |
66 |
with (obj_steamworks_chem_07_door) |
67 |
{ |
68 |
image_speed = 0.5 |
69 |
image_index = 0 |
70 |
} |
71 |
audio_play_sound(snd_rumble, 1, 1) |
72 |
cutscene_advance() |
73 |
break |
74 |
case 10: |
75 |
if (obj_steamworks_chem_07_door.image_index >= (obj_steamworks_chem_07_door.image_number - 1)) |
76 |
{ |
77 |
obj_steamworks_chem_07_door.image_index = obj_steamworks_chem_07_door.image_number - 1 |
78 |
obj_steamworks_chem_07_door.image_speed = 0 |
79 |
obj_steamworks_chem_07_door.solid = false |
80 |
audio_stop_sound(snd_rumble) |
81 |
audio_play_sound(snd_mart_impact_3, 1, 0) |
82 |
cutscene_advance() |
83 |
} |
84 |
break |
85 |
case 11: |
86 |
cutscene_screenshake(0.5, 2) |
87 |
break |
88 |
case 12: |
89 |
cutscene_wait(0.5) |
90 |
break |
91 |
case 13: |
92 |
audio_sound_gain(obj_radio.current_song, 1, 1000) |
93 |
global.sworks_flag[55] = 1 |
94 |
scr_cutscene_end() |
95 |
scene = 0 |
96 |
break |
97 |
} |