1 |
if (type == 0) |
2 |
{ |
3 |
curang = 0; |
4 |
rotspeed = 8; |
5 |
rotmin = 2; |
6 |
num = 7; |
7 |
rate = 20; |
8 |
rr = 220; |
9 |
} |
10 |
if (type == 1) |
11 |
{ |
12 |
curang = 0; |
13 |
rotspeed = -8; |
14 |
rotmin = -2; |
15 |
num = 7; |
16 |
rate = 20; |
17 |
rr = 220; |
18 |
} |
19 |
if (type == 2) |
20 |
{ |
21 |
curang = random(360); |
22 |
rotspeed = 8; |
23 |
rotmin = 2; |
24 |
num = 8; |
25 |
rate = 20; |
26 |
rr = 230; |
27 |
} |
28 |
if (type == 3) |
29 |
{ |
30 |
curang = random(360); |
31 |
rotspeed = -8; |
32 |
rotmin = -2; |
33 |
num = 8; |
34 |
rate = 20; |
35 |
rr = 230; |
36 |
} |
37 |
for (i = 0; i < num; i += 1) |
38 |
{ |
39 |
hx = x + 8 + lengthdir_x(rr, curang + ((i / num) * 360)); |
40 |
hy = y + 8 + lengthdir_y(rr, curang + ((i / num) * 360)); |
41 |
spear[i] = instance_create(hx, hy, obj_rotspear); |
42 |
spear[i].parent = id; |
43 |
with (spear[i]) |
44 |
image_angle = point_direction(x, y, parent.x, parent.y); |
45 |
} |
46 |
active = 1; |