1 |
if (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;
}
} () && keyboard_multicheck_pressed(0)) |
2 |
{ |
3 |
if (switch_no_crawl == false) |
4 |
{ |
5 |
global.cutscene = true; |
6 |
scene = 1; |
7 |
} |
8 |
else |
9 |
{ |
10 |
obj_pl.state = scr_frozen_state; |
11 |
scene = 5; |
12 |
} |
13 |
} |
14 |
if (scene == 1) |
15 |
{ |
16 |
if (global.dialogue_open) |
17 |
exit; |
18 |
if (image_speed == 0) |
19 |
{ |
20 |
audio_play_sound(snd_steamworks_13_vent, 20, 0); |
21 |
image_speed = 1/3; |
22 |
} |
23 |
if (image_index >= (image_number - 1)) |
24 |
{ |
25 |
image_speed = 0; |
26 |
image_index = image_number - 1; |
27 |
scene = 2; |
28 |
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); |
29 |
} |
30 |
} |
31 |
if (scene == 2) |
32 |
cutscene_wait(0.5); |
33 |
if (scene == 3) |
34 |
{ |
35 |
if (draw_alpha < 1) |
36 |
draw_alpha += 0.1; |
37 |
else |
38 |
cutscene_advance(); |
39 |
} |
40 |
if (scene == 4) |
41 |
{ |
42 |
scr_change_roomscr_change_roomfunction scr_change_room(arg0, arg1, arg2)
{
if (!instance_exists(obj_transition))
{
trn = instance_create(x, y, obj_transition);
trn.newRoom = arg0;
if (instance_exists(obj_pl))
{
trn.xx = arg1;
trn.yy = arg2;
}
}
} (170, 100, 150); |
43 |
instance_create(0, 0, obj_controller_steamworks_20_vent); |
44 |
} |
45 |
if (scene == 5) |
46 |
cutscene_change_room(170, 100, 150, 0.1); |