1 | if (move == true) |
2 | { |
3 | i = 0 |
4 | while (i < attack_mult) |
5 | { |
6 | x += lengthdir_x(attack_speed, image_angle) |
7 | y += lengthdir_y(attack_speed, image_angle) |
8 | if place_meeting(x, y, obj_attack_boundary_box) |
9 | { |
10 | move = false |
11 | alarm[0] = fade_alarm |
12 | break |
13 | } |
14 | else |
15 | { |
16 | i++ |
17 | continue |
18 | } |
19 | } |
20 | } |
21 | if (fade == true) |
22 | { |
23 | if (image_alpha > 0) |
24 | { |
25 | image_alpha -= 0.1 |
26 | if (image_alpha <= 0) |
27 | instance_destroy() |
28 | } |
29 | } |