1 |
image_alpha = 0.05; |
2 |
if (instance_exists(obj_mainchara) && ignorebuffer < 0) |
3 |
{ |
4 |
obj_mainchara.swordmode = 0; |
5 |
if (instance_exists(obj_swordobjparent)) |
6 |
{ |
7 |
if (obj_mainchara.bbox_right >= x && obj_mainchara.bbox_left <= (x + sprite_width)) |
8 |
{ |
9 |
if (obj_mainchara.bbox_bottom >= y && obj_mainchara.bbox_top <= (y + sprite_height)) |
10 |
{ |
11 |
obj_swordarea.checkid = id; |
12 |
with (obj_swordarea) |
13 |
{ |
14 |
if (id != checkid) |
15 |
ignorebuffer = 2; |
16 |
} |
17 |
swordobj = collision_rectangle(x, y, x + sprite_width, y + sprite_height, obj_swordobjparent, false, true); |
18 |
if (swordobj != -4) |
19 |
{ |
20 |
if (swordobj.active == 1) |
21 |
obj_mainchara.swordmode = 1; |
22 |
} |
23 |
} |
24 |
} |
25 |
} |
26 |
} |
27 |
ignorebuffer--; |