| 1 |
if (move == false) |
| 2 |
{ |
| 3 |
if (distance_counter < distance_counter_max) |
| 4 |
{ |
| 5 |
x += lengthdir_x(move_speed_create, angle); |
| 6 |
y += lengthdir_y(move_speed_create, angle); |
| 7 |
distance_counter += 1; |
| 8 |
} |
| 9 |
} |
| 10 |
else if (move == true) |
| 11 |
{ |
| 12 |
if (no_loop == false) |
| 13 |
{ |
| 14 |
angle = point_direction(x, y, obj_heart_battle_fighting_parent.x, obj_heart_battle_fighting_parent.y); |
| 15 |
no_loop = true; |
| 16 |
} |
| 17 |
x += lengthdir_x(move_speed_attack, angle); |
| 18 |
y += lengthdir_y(move_speed_attack, angle); |
| 19 |
if (move_speed_attack < move_speed_attack_max) |
| 20 |
{ |
| 21 |
move_speed_attack += move_speed_attack_increase; |
| 22 |
if (move_speed_attack > move_speed_attack_max) |
| 23 |
move_speed_attack = move_speed_attack_max; |
| 24 |
} |
| 25 |
} |
| 26 |
if (bbox_right < 0 || bbox_left > room_width || bbox_bottom < 0 || bbox_top > room_height) |
| 27 |
instance_destroy(); |