| 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 |
var can_trail = false; |
| 11 |
trail_cc_current += 1; |
| 12 |
if (trail_cc_current >= trail_cc_max) |
| 13 |
{ |
| 14 |
can_trail = true; |
| 15 |
trail_cc_current = 0; |
| 16 |
} |
| 17 |
if (can_trail == true) |
| 18 |
{ |
| 19 |
ds_list_add(x_list, x); |
| 20 |
ds_list_add(y_list, y); |
| 21 |
ds_list_add(angle_list, direction); |
| 22 |
while (ds_list_size(x_list) > max_points_trail) |
| 23 |
{ |
| 24 |
ds_list_delete(x_list, 0); |
| 25 |
ds_list_delete(y_list, 0); |
| 26 |
ds_list_delete(angle_list, 0); |
| 27 |
} |
| 28 |
} |
| 29 |
x += lengthdir_x(attack_speed, direction); |
| 30 |
y += lengthdir_y(attack_speed, direction); |
| 31 |
if (place_meeting(x, y, obj_dialogue_box_battle_transformation_any) && in_box == false) |
| 32 |
in_box = true; |
| 33 |
if (!place_meeting(x, y, obj_dialogue_box_battle_transformation_any) && in_box == true) |
| 34 |
{ |
| 35 |
if (image_alpha > 0) |
| 36 |
{ |
| 37 |
image_alpha -= 0.1; |
| 38 |
if (image_alpha < 0) |
| 39 |
image_alpha = 0; |
| 40 |
if (image_alpha == 0) |
| 41 |
instance_destroy(); |
| 42 |
} |
| 43 |
} |
| 44 |
} |