1 |
if (arc_enemy_death == false) |
2 |
{ |
3 |
if (step == 0) |
4 |
{ |
5 |
if (y < y_destination) |
6 |
y += 2 |
7 |
else |
8 |
step = 1 |
9 |
} |
10 |
if (step == 1) |
11 |
{ |
12 |
if (wait_timer > 0) |
13 |
wait_timer-- |
14 |
else |
15 |
step = 2 |
16 |
} |
17 |
if (step == 2) |
18 |
{ |
19 |
var bul1 = instance_create(x, (y + 12), obj_arcade_enemy_bullet) |
20 |
var bul2 = instance_create((x - 2), (y + 12), obj_arcade_enemy_bullet) |
21 |
var bul3 = instance_create((x + 2), (y + 12), obj_arcade_enemy_bullet) |
22 |
with (bul1) |
23 |
direction = 270 |
24 |
with (bul2) |
25 |
direction = 315 |
26 |
with (bul3) |
27 |
direction = 225 |
28 |
step = 3 |
29 |
} |
30 |
if (step == 3 && (!arc_enemy_hit)) |
31 |
x += arc_enemy_hsp |
32 |
} |
33 |
else |
34 |
{ |
35 |
if (step == 0) |
36 |
{ |
37 |
if (image_index >= (image_number - image_speed)) |
38 |
{ |
39 |
image_speed = 0 |
40 |
arc_enemy_hsp = 5 |
41 |
step++ |
42 |
} |
43 |
} |
44 |
if (step == 1) |
45 |
x += arc_enemy_hsp |
46 |
} |
47 |
if (x != clamp(x, 0, 260)) |
48 |
instance_destroy() |