1 |
if live_call() |
2 |
return global.live_result; |
3 |
visible = true |
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 |
{ |
6 |
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
} () |
7 |
scene = 0 |
8 |
} |
9 |
if (scene == 0) |
10 |
{ |
11 |
scr_textscr_textfunction scr_text() //gml_Script_scr_text
{
if (!instance_exists(obj_dialogue))
msg = instance_create(x, y, obj_dialogue)
} () |
12 |
with (msg) |
13 |
{ |
14 |
message[0] = "* (Crawl through the vent?)" |
15 |
ch[1] = "Yes" |
16 |
ch[2] = "No" |
17 |
ch_msg = 0 |
18 |
if (outcome == 1) |
19 |
other.scene += 1 |
20 |
if (outcome == 2) |
21 |
{ |
22 |
scr_cutscene_end() |
23 |
other.scene = -1 |
24 |
} |
25 |
} |
26 |
} |
27 |
if (scene == 1) |
28 |
{ |
29 |
if global.dialogue_open |
30 |
return; |
31 |
scene = 2 |
32 |
scr_audio_fade_outscr_audio_fade_outfunction scr_audio_fade_out(argument0, argument1) //gml_Script_scr_audio_fade_out
{
var snd = argument0
var fade_len = argument1
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) |
33 |
} |
34 |
if (scene == 2) |
35 |
cutscene_wait(0.5) |
36 |
if (scene == 3) |
37 |
{ |
38 |
if (draw_alpha < 1) |
39 |
{ |
40 |
show_debug_message(draw_alpha) |
41 |
draw_alpha += 0.1 |
42 |
} |
43 |
else |
44 |
cutscene_advance() |
45 |
} |
46 |
if (scene == 4) |
47 |
{ |
48 |
scr_change_roomscr_change_roomfunction scr_change_room(argument0, argument1, argument2) //gml_Script_scr_change_room
{
if (!instance_exists(obj_transition))
{
trn = instance_create(x, y, obj_transition)
trn.newRoom = argument0
if instance_exists(obj_pl)
{
trn.xx = argument1
trn.yy = argument2
}
}
} (room_target, x_target, y_target) |
49 |
instance_create(0, 0, obj_controller_steamworks_20_vent) |
50 |
} |