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 (can_move == true) |
13 | { |
14 | if (reverse == true) |
15 | { |
16 | if (abs(starting_position_x - x) < abs(x_speed * 3)) |
17 | x -= (x_speed / 2) |
18 | else |
19 | reverse = false |
20 | } |
21 | else |
22 | x += x_speed |
23 | } |
24 | if place_meeting(x, y, obj_dialogue_box_battle_transformation_any) |
25 | can_vanish = true |
26 | if ((!(place_meeting(x, y, obj_dialogue_box_battle_transformation_any))) && can_vanish == true) |
27 | { |
28 | if (image_alpha > 0) |
29 | { |
30 | image_alpha -= 0.1 |
31 | if (image_alpha < 0) |
32 | image_alpha = 0 |
33 | if (image_alpha == 0) |
34 | instance_destroy() |
35 | } |
36 | } |