1 |
if (fade == false && image_alpha < 1) |
2 |
{ |
3 |
if (image_alpha < 1) |
4 |
{ |
5 |
image_alpha += 0.1 |
6 |
if (image_alpha >= 1) |
7 |
{ |
8 |
image_alpha = 1 |
9 |
move = true |
10 |
audio_play_sound(snd_undyne_spear_fly, 20, false) |
11 |
} |
12 |
} |
13 |
} |
14 |
if (move == true) |
15 |
{ |
16 |
i = 0 |
17 |
while (i < attack_mult) |
18 |
{ |
19 |
if (bd_dist_passed == true) |
20 |
image_angle -= (attack_direction * angle_increase) |
21 |
x += lengthdir_x(attack_speed, image_angle) |
22 |
y += lengthdir_y(attack_speed, image_angle) |
23 |
if (abs(x - default_x) >= bd_dist_min) |
24 |
bd_dist_passed = true |
25 |
if (bd_dist_passed == true && place_meeting(x, y, obj_attack_boundary_box)) |
26 |
{ |
27 |
move = false |
28 |
alarm[0] = fade_alarm |
29 |
break |
30 |
} |
31 |
else |
32 |
{ |
33 |
i++ |
34 |
continue |
35 |
} |
36 |
} |
37 |
} |
38 |
if (fade == true) |
39 |
{ |
40 |
if (image_alpha > 0) |
41 |
{ |
42 |
image_alpha -= 0.1 |
43 |
if (image_alpha <= 0) |
44 |
instance_destroy() |
45 |
} |
46 |
} |