1 |
if (crowd_animate == true) |
2 |
{ |
3 |
if (image_speed == 0) |
4 |
{ |
5 |
audio_sound_gain(crowd_sound, 1, 250) |
6 |
image_speed = 0.2 |
7 |
} |
8 |
if (crowd_animate_interact_noloop == true && global.dialogue_open == false) |
9 |
{ |
10 |
crowd_animate_interact_noloop = false |
11 |
crowd_animate = false |
12 |
} |
13 |
} |
14 |
else if (image_speed == 0.2) |
15 |
{ |
16 |
audio_sound_gain(crowd_sound, 0, 250) |
17 |
image_speed = 0 |
18 |
image_index = 0 |
19 |
} |
20 |
else |
21 |
{ |
22 |
if (global.route == 1 && global.sworks_flag[0] > 0) |
23 |
return; |
24 |
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) && crowd_animate_interact_noloop == false) |
25 |
{ |
26 |
scr_textscr_textfunction scr_text() //gml_Script_scr_text
{
if (!instance_exists(obj_dialogue))
msg = instance_create(x, y, obj_dialogue)
} () |
27 |
with (msg) |
28 |
{ |
29 |
message[0] = "* (Everyone is wrapped up in# conversation.)" |
30 |
message[1] = "* (Quite the popular spot!)" |
31 |
} |
32 |
crowd_animate = true |
33 |
crowd_animate_interact_noloop = true |
34 |
} |
35 |
} |