1 |
if (global.dunes_flag[2] == 0) |
2 |
{ |
3 |
if (obj_sandstorm_controller.storm_active == true) |
4 |
{ |
5 |
sprite_index = spr_storm_fan |
6 |
image_speed = 0.6 |
7 |
} |
8 |
else if (sprite_index == spr_storm_fan) |
9 |
{ |
10 |
sprite_index = spr_storm_fan_stop |
11 |
image_index = 0 |
12 |
image_speed = 0.4 |
13 |
} |
14 |
} |
15 |
else if (sprite_index == spr_storm_fan) |
16 |
{ |
17 |
sprite_index = spr_storm_fan_stop |
18 |
image_index = 0 |
19 |
image_speed = 0.4 |
20 |
} |
21 |
if (sprite_index == spr_storm_fan_stop) |
22 |
{ |
23 |
if on_animation_end() |
24 |
image_speed = 0 |
25 |
} |
26 |
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)) |
27 |
waiter = 1 |
28 |
if (waiter == 1) |
29 |
{ |
30 |
if (instance_exists(obj_sandstorm_controller) && obj_sandstorm_controller.storm_active && obj_pl.x < x) |
31 |
{ |
32 |
waiter = 0 |
33 |
return; |
34 |
} |
35 |
scr_textscr_textfunction scr_text() //gml_Script_scr_text
{
if (!instance_exists(obj_dialogue))
msg = instance_create(x, y, obj_dialogue)
} () |
36 |
if (global.dunes_flag[2] == 0) |
37 |
{ |
38 |
with (msg) |
39 |
{ |
40 |
message[0] = "* (Turn it off?)" |
41 |
ch_msg = 0 |
42 |
ch[1] = "Yes" |
43 |
ch[2] = "No" |
44 |
if (outcome == 1) |
45 |
{ |
46 |
global.dialogue_open = false |
47 |
global.dunes_flag[2] = 1 |
48 |
instance_destroy(obj_sandstorm_controller) |
49 |
if audio_is_playing(snd_sandstorm) |
50 |
audio_stop_sound(snd_sandstorm) |
51 |
obj_storm_fan_lever.image_speed = 1 |
52 |
other.waiter = 0 |
53 |
} |
54 |
if (outcome == 2) |
55 |
{ |
56 |
global.dialogue_open = false |
57 |
other.waiter = 0 |
58 |
} |
59 |
} |
60 |
} |
61 |
else if (global.dunes_flag[2] >= 1) |
62 |
{ |
63 |
if (obj_pl.y > (bbox_bottom - 10)) |
64 |
{ |
65 |
with (msg) |
66 |
{ |
67 |
message[0] = "* Built to order by Hotland# Mechanics." |
68 |
message[1] = "* Super Seal of Hotland Quality:" |
69 |
message[2] = "* (The seal is drawn in permanent# marker.)" |
70 |
} |
71 |
} |
72 |
else |
73 |
{ |
74 |
with (msg) |
75 |
message[0] = "* (It's probably better to# leave it turned off.)" |
76 |
} |
77 |
waiter = 0 |
78 |
} |
79 |
} |