| 1 |
if (!instance_exists(obj_heart_battle_fighting_parent)) |
| 2 |
{ |
| 3 |
instance_destroy(); |
| 4 |
exit; |
| 5 |
} |
| 6 |
if (image_alpha < 1 && can_move == false) |
| 7 |
{ |
| 8 |
image_alpha += 0.1; |
| 9 |
if (image_alpha > 1) |
| 10 |
image_alpha = 1; |
| 11 |
if (image_alpha == 1) |
| 12 |
can_move = true; |
| 13 |
} |
| 14 |
if (can_move == true) |
| 15 |
{ |
| 16 |
game_maker_cannot_do_math = power((time_elapsed / ((time_max / 2) * (1 / sqrt(max_rise)))) - sqrt(max_rise), 2); |
| 17 |
animation_disjoint_x = sign_modifier * (max_rise - round(game_maker_cannot_do_math)); |
| 18 |
time_elapsed += time_increase; |
| 19 |
if (time_elapsed >= time_max) |
| 20 |
{ |
| 21 |
time_elapsed = 0; |
| 22 |
sign_modifier = -sign_modifier; |
| 23 |
} |
| 24 |
x_point = starting_position_x + animation_disjoint_x; |
| 25 |
animation_disjoint_y += fall_speed; |
| 26 |
y_point = round(starting_position_y + animation_disjoint_y); |
| 27 |
} |
| 28 |
position_factor = (x_point - starting_position_x) / max_rise; |
| 29 |
angle_pos = angle_pos_default + (angle_pos_max * position_factor); |
| 30 |
x = x_point + (angle_radius * cos(angle_pos * 0.008726646259971648)); |
| 31 |
y = y_point - (angle_radius * sin(angle_pos * 0.008726646259971648)); |
| 32 |
image_angle += (angle_increase * position_factor); |
| 33 |
if (bbox_top > obj_dialogue_box_battle_transformation_any.bbox_bottom) |
| 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 |
} |