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 | { |
23 | x += x_speed; |
24 | } |
25 | } |
26 | if (place_meeting(x, y, obj_dialogue_box_battle_transformation_any)) |
27 | can_vanish = true; |
28 | if (!place_meeting(x, y, obj_dialogue_box_battle_transformation_any) && can_vanish == true) |
29 | { |
30 | if (image_alpha > 0) |
31 | { |
32 | image_alpha -= 0.1; |
33 | if (image_alpha < 0) |
34 | image_alpha = 0; |
35 | if (image_alpha == 0) |
36 | instance_destroy(); |
37 | } |
38 | } |