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)) |
5 |
{ |
6 |
scr_cutscene_start(); |
7 |
audio_play_sound(snd_switch, 1, 0); |
8 |
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, 750); |
9 |
cutscene_advance(); |
10 |
} |
11 |
break; |
12 |
case 1: |
13 |
cutscene_wait(1); |
14 |
break; |
15 |
case 2: |
16 |
cutscene_dialogue(); |
17 |
with (msg) |
18 |
message[0] = "* (Something happened somewhere.)"; |
19 |
break; |
20 |
case 3: |
21 |
scr_radio_restart(); |
22 |
audio_sound_gain(obj_radio.current_song, 1, 0); |
23 |
cutscene_advance(); |
24 |
scr_cutscene_end(); |
25 |
global.sworks_flag[46] = 1; |
26 |
break; |
27 |
case 4: |
28 |
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)) |
29 |
{ |
30 |
scr_textscr_textfunction scr_text()
{
if (!instance_exists(obj_dialogue))
msg = instance_create(x, y, obj_dialogue);
} (); |
31 |
with (msg) |
32 |
message[0] = "* (Something already happened# somewhere.)"; |
33 |
} |
34 |
break; |
35 |
} |