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 |
for (i = 0; i < attack_mult; i++) |
17 |
{ |
18 |
if (bd_dist_passed == true) |
19 |
image_angle -= (attack_direction * angle_increase); |
20 |
x += lengthdir_x(attack_speed, image_angle); |
21 |
y += lengthdir_y(attack_speed, image_angle); |
22 |
if (abs(x - default_x) >= bd_dist_min) |
23 |
bd_dist_passed = true; |
24 |
if (bd_dist_passed == true && place_meeting(x, y, obj_attack_boundary_box)) |
25 |
{ |
26 |
move = false; |
27 |
alarm[0] = fade_alarm; |
28 |
break; |
29 |
} |
30 |
} |
31 |
} |
32 |
if (fade == true) |
33 |
{ |
34 |
if (image_alpha > 0) |
35 |
{ |
36 |
image_alpha -= 0.1; |
37 |
if (image_alpha <= 0) |
38 |
instance_destroy(); |
39 |
} |
40 |
} |