1 |
if (live_call()) |
2 |
return global.live_result; |
3 |
if (!instance_exists(obj_heart_battle_fighting_parent)) |
4 |
{ |
5 |
instance_destroy(); |
6 |
exit; |
7 |
} |
8 |
if (state < 1) |
9 |
{ |
10 |
attack_target_x = target.x; |
11 |
attack_target_y = target.y; |
12 |
} |
13 |
x = attack_target_x + lengthdir_x(attack_distance, attack_dir); |
14 |
y = attack_target_y + lengthdir_y(attack_distance, attack_dir); |
15 |
if (image_alpha < 1 && can_move == false) |
16 |
{ |
17 |
image_alpha += 0.2; |
18 |
if (image_alpha > 1) |
19 |
image_alpha = 1; |
20 |
} |
21 |
if (attack_dir < 360) |
22 |
attack_dir += bullet_speed; |
23 |
else |
24 |
attack_dir = bullet_speed; |
25 |
if (state == 0) |
26 |
{ |
27 |
} |
28 |
if (state == 1 || state == 2) |
29 |
{ |
30 |
if (attack_distance > 0) |
31 |
{ |
32 |
attack_distance -= homing_speed; |
33 |
} |
34 |
else |
35 |
{ |
36 |
var count = 0; |
37 |
with (object_index) |
38 |
{ |
39 |
if (bullet_spawner == other.bullet_spawner) |
40 |
count += 1; |
41 |
} |
42 |
if (count == 1) |
43 |
instance_create_depth(attack_target_x, attack_target_y, -200, obj_battle_enemy_attack_ceroba_flower_circle_explosion); |
44 |
instance_destroy(); |
45 |
instance_destroy(bullet_spawner); |
46 |
} |
47 |
if (state != 2) |
48 |
{ |
49 |
homing_speed += 0.1; |
50 |
if (global.hotland_flag[2] == 3) |
51 |
homing_speed += 0.1; |
52 |
} |
53 |
} |