| 1 |
switch (scene) |
| 2 |
{ |
| 3 |
case 0: |
| 4 |
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) && obj_pl.direction == 90) |
| 5 |
{ |
| 6 |
scr_cutscene_start(); |
| 7 |
cutscene_advance(); |
| 8 |
} |
| 9 |
break; |
| 10 |
case 1: |
| 11 |
cutscene_dialogue(); |
| 12 |
with (msg) |
| 13 |
{ |
| 14 |
if (global.geno_complete[3] == true) |
| 15 |
{ |
| 16 |
other.scene = 0; |
| 17 |
global.cutscene = false; |
| 18 |
message[0] = "* (A presence is cowering behind# the storage cabinet.)\t"; |
| 19 |
message[1] = "* (But it won't budge.)"; |
| 20 |
} |
| 21 |
else |
| 22 |
{ |
| 23 |
message[0] = "* (You notice wall cracks peeking# out from behind the cabinet.)\t"; |
| 24 |
message[1] = "* (Move it?)"; |
| 25 |
ch_msg = 1; |
| 26 |
ch[1] = "Yes"; |
| 27 |
ch[2] = "No"; |
| 28 |
if (outcome == 1) |
| 29 |
other.scene++; |
| 30 |
if (outcome == 2) |
| 31 |
{ |
| 32 |
scr_cutscene_end(); |
| 33 |
other.scene = 0; |
| 34 |
} |
| 35 |
} |
| 36 |
} |
| 37 |
break; |
| 38 |
case 2: |
| 39 |
layer_hspeed("moving_cabinet", -1); |
| 40 |
audio_play_sound(snd_rumble, 1, 1); |
| 41 |
cutscene_advance(); |
| 42 |
break; |
| 43 |
case 3: |
| 44 |
if (layer_get_x("moving_cabinet") <= -40) |
| 45 |
{ |
| 46 |
audio_stop_sound(snd_rumble); |
| 47 |
cutscene_advance(); |
| 48 |
} |
| 49 |
break; |
| 50 |
case 4: |
| 51 |
audio_play_sound(snd_mart_impact_1, 1, 0); |
| 52 |
layer_hspeed("moving_cabinet", 0); |
| 53 |
global.sworks_flag[30] = 1; |
| 54 |
x -= 40; |
| 55 |
cutscene_advance(); |
| 56 |
scr_cutscene_end(); |
| 57 |
break; |
| 58 |
} |