1 |
if (!instance_exists(obj_heart)) |
2 |
{ |
3 |
instance_destroy(); |
4 |
exit; |
5 |
} |
6 |
if (!i_ex(target)) |
7 |
{ |
8 |
move_towards_point(x + 150, y, 22); |
9 |
image_angle = direction; |
10 |
exit; |
11 |
} |
12 |
if (target == obj_spamton_neo_enemy) |
13 |
{ |
14 |
move_towards_point(x + 150, y, 22); |
15 |
image_angle = direction; |
16 |
exit; |
17 |
} |
18 |
move_towards_point(target.x, target.y, 22); |
19 |
image_angle = direction; |
20 |
target = obj_spamton_neo_enemy; |
21 |
var dist = 9999; |
22 |
if (instance_exists(obj_pipis_bullet)) |
23 |
{ |
24 |
if (distance_to_object(instance_nearest(x, y, obj_pipis_bullet)) < dist) |
25 |
target = instance_nearest(x, y, obj_pipis_bullet); |
26 |
} |
27 |
if (instance_exists(obj_pipis_egg_bullet)) |
28 |
{ |
29 |
if (distance_to_object(instance_nearest(x, y, obj_pipis_egg_bullet)) < dist) |
30 |
target = instance_nearest(x, y, obj_pipis_egg_bullet); |
31 |
} |
32 |
if (instance_exists(obj_sneo_heartattack)) |
33 |
{ |
34 |
if (distance_to_object(instance_nearest(x, y, obj_sneo_heartattack)) < dist) |
35 |
target = instance_nearest(x, y, obj_sneo_heartattack); |
36 |
} |
37 |
if (instance_exists(obj_sneo_heatattack_bullet)) |
38 |
{ |
39 |
if (distance_to_object(instance_nearest(x, y, obj_sneo_heatattack_bullet)) < dist) |
40 |
target = instance_nearest(x, y, obj_sneo_heatattack_bullet); |
41 |
} |
42 |
if (instance_exists(obj_sneo_lilguy)) |
43 |
{ |
44 |
if (distance_to_object(instance_nearest(x, y, obj_sneo_lilguy)) < dist) |
45 |
target = instance_nearest(x, y, obj_sneo_lilguy); |
46 |
} |
47 |
if (instance_exists(obj_sneo_lilguy_bullet)) |
48 |
{ |
49 |
if (distance_to_object(instance_nearest(x, y, obj_sneo_lilguy_bullet)) < dist) |
50 |
target = instance_nearest(x, y, obj_sneo_lilguy_bullet); |
51 |
} |
52 |
if (instance_exists(obj_sneo_wireheart)) |
53 |
{ |
54 |
if (distance_to_object(instance_nearest(x, y, obj_sneo_wireheart)) < dist) |
55 |
target = instance_nearest(x, y, obj_sneo_wireheart); |
56 |
} |
57 |
if (instance_exists(obj_sneo_faceattack_target)) |
58 |
{ |
59 |
if (distance_to_object(instance_nearest(x, y, obj_sneo_faceattack_target)) < dist) |
60 |
target = instance_nearest(x, y, obj_sneo_faceattack_target); |
61 |
} |
62 |
if (x >= (camerax() + 500) && x < (camerax() + 530) && instance_exists(obj_sneo_faceattack) && obj_sneo_faceattack.init == 1) |
63 |
instance_destroy(); |