1 |
if (image_alpha < 1 && can_move == false) |
2 |
{ |
3 |
image_alpha += 0.1 |
4 |
if (image_alpha > 1) |
5 |
image_alpha = 1 |
6 |
if (image_alpha == 1) |
7 |
{ |
8 |
image_speed = 0.5 |
9 |
can_move = true |
10 |
} |
11 |
} |
12 |
if (instance_exists(obj_dialogue_box_battle_transformation_any) && no_loop_switch == false) |
13 |
{ |
14 |
if (y >= (obj_dialogue_box_battle_transformation_any.y - 4) && y <= (obj_dialogue_box_battle_transformation_any.y + 4)) |
15 |
{ |
16 |
starting_position_y = y |
17 |
max_rise /= 2 |
18 |
time_elapsed = 1 |
19 |
time_increase *= 2 |
20 |
no_loop_switch = true |
21 |
} |
22 |
} |
23 |
if (can_move == true) |
24 |
{ |
25 |
game_maker_cannot_do_math = power((time_elapsed / (time_max / 2 * (1 / sqrt(max_rise))) - sqrt(max_rise)), 2) |
26 |
animation_disjoint_y = sign_modifier * (max_rise - round(game_maker_cannot_do_math)) |
27 |
time_elapsed += time_increase |
28 |
if (time_elapsed >= time_max) |
29 |
{ |
30 |
time_elapsed = 0 |
31 |
sign_modifier = (-sign_modifier) |
32 |
} |
33 |
y = starting_position_y + animation_disjoint_y |
34 |
animation_disjoint_x += x_speed |
35 |
x = round(starting_position_x + animation_disjoint_x) |
36 |
if place_meeting(x, y, obj_dialogue_box_battle_transformation_any) |
37 |
can_vanish = true |
38 |
if ((!(place_meeting(x, y, obj_dialogue_box_battle_transformation_any))) && can_vanish == true) |
39 |
{ |
40 |
if (image_alpha > 0) |
41 |
{ |
42 |
image_alpha -= 0.1 |
43 |
if (image_alpha < 0) |
44 |
image_alpha = 0 |
45 |
if (image_alpha == 0) |
46 |
instance_destroy() |
47 |
} |
48 |
} |
49 |
} |