1 |
siner += 1; |
2 |
draw_sprite(sprite_index, image_index, x, y); |
3 |
if (active != 2) |
4 |
{ |
5 |
draw_set_alpha((abs(sin(siner / 3)) / 2) + 0.5); |
6 |
if (active == 0) |
7 |
{ |
8 |
draw_set_alpha(0.3); |
9 |
image_speed = 0; |
10 |
} |
11 |
else |
12 |
{ |
13 |
image_speed = 0.5; |
14 |
} |
15 |
if (blue == 1) |
16 |
{ |
17 |
draw_set_color(#14A9FF); |
18 |
sprite_index = spr_lasermachine_b; |
19 |
} |
20 |
if (blue == 2) |
21 |
{ |
22 |
draw_set_color(c_orange); |
23 |
sprite_index = spr_lasermachine_o; |
24 |
} |
25 |
ossafe_fill_rectangle(x + 8, y + 16, x + 11, y + 320); |
26 |
if (active == 1 && activebuffer < 0) |
27 |
{ |
28 |
if (collision_rectangle(x + 9, y + 18, x + 10, y + 320, obj_mainchara, 0, 1)) |
29 |
event_user(0); |
30 |
} |
31 |
} |
32 |
else |
33 |
{ |
34 |
sprite_index = spr_lasermachine_off; |
35 |
} |
36 |
draw_set_alpha(1); |
37 |
if (ex == 1 && instance_exists(OBJ_WRITER) == 0) |
38 |
{ |
39 |
alarm[3] = 1; |
40 |
ex = 0; |
41 |
} |
42 |
activebuffer -= 1; |
43 |
if (active != 1) |
44 |
activebuffer = 1; |