1 |
if lasers_activate |
2 |
{ |
3 |
if (image_alpha < 1) |
4 |
image_alpha += 0.2 |
5 |
if (activate_delay > 0) |
6 |
activate_delay -= 1 |
7 |
else |
8 |
{ |
9 |
audio_stop_sound(snd_switch) |
10 |
audio_play_sound(snd_switch, 1, 0) |
11 |
if (sprite_index != spr_hotland_lasers_on) |
12 |
{ |
13 |
sprite_index = spr_hotland_lasers_on |
14 |
image_index = 2 |
15 |
} |
16 |
else |
17 |
sprite_index = spr_hotland_lasers_off |
18 |
activate_delay = activate_delay_max |
19 |
activate_count -= 1 |
20 |
} |
21 |
if (activate_count <= 0) |
22 |
{ |
23 |
audio_stop_sound(snd_switch) |
24 |
audio_play_sound(snd_switch, 1, 0) |
25 |
lasers_active = true |
26 |
lasers_activate = false |
27 |
} |
28 |
} |
29 |
if (lasers_active == true) |
30 |
{ |
31 |
if (image_speed != 1) |
32 |
{ |
33 |
sprite_index = spr_hotland_lasers_on |
34 |
image_index = 0 |
35 |
image_speed = 1 |
36 |
} |
37 |
} |