1 |
if (instance_exists(obj_mainchara) && ignorebuffer < 0) |
2 |
{ |
3 |
obj_mainchara.battlemode = 0; |
4 |
cancel = 0; |
5 |
if (onlyActiveIfBulletsExist && !instance_exists(obj_overworldbulletparent)) |
6 |
cancel = 1; |
7 |
if (onlyActiveIfSpecialObjectExists && !i_ex(specialObject)) |
8 |
cancel = 1; |
9 |
if (cancel == 0) |
10 |
{ |
11 |
if (obj_mainchara.bbox_right >= x && obj_mainchara.bbox_left <= (x + sprite_width) && obj_mainchara.bbox_bottom >= y && obj_mainchara.bbox_top <= (y + sprite_height)) |
12 |
{ |
13 |
obj_overworld_bulletarea.checkid = id; |
14 |
with (obj_overworld_bulletarea) |
15 |
{ |
16 |
if (id != checkid) |
17 |
ignorebuffer = 2; |
18 |
} |
19 |
obj_mainchara.battlemode = 1; |
20 |
if (keepHidden == 0) |
21 |
{ |
22 |
with (obj_overworld_bulletarea) |
23 |
{ |
24 |
if (scr_debug()) |
25 |
showArea = 1; |
26 |
} |
27 |
} |
28 |
} |
29 |
} |
30 |
} |
31 |
ignorebuffer--; |
32 |
if (obj_mainchara.battlemode == 0) |
33 |
timer++; |
34 |
else |
35 |
timer = 0; |
36 |
if (timer >= 60) |
37 |
{ |
38 |
with (obj_darkcontroller) |
39 |
charcon = 0; |
40 |
} |
41 |
image_alpha = 0; |