1 |
if (!instance_exists(obj_heart_battle_fighting_parent)) |
2 |
{ |
3 |
instance_destroy(); |
4 |
exit; |
5 |
} |
6 |
if (state == 2 && obj_heart_battle_fighting_parent.vulnerable == true && !place_meeting(xprevious, yprevious, obj_heart_hitbox_parent)) |
7 |
{ |
8 |
var hsc_x_temp = x; |
9 |
var hsc_y_temp = y; |
10 |
var hsc_max = 4; |
11 |
for (i = 0; i < hsc_max; i++) |
12 |
{ |
13 |
x -= lengthdir_x(attack_speed / hsc_max, image_angle); |
14 |
y -= lengthdir_y(attack_speed / hsc_max, image_angle); |
15 |
with (obj_heart_hitbox_parent) |
16 |
event_user(0); |
17 |
} |
18 |
x = hsc_x_temp; |
19 |
y = hsc_y_temp; |
20 |
} |