1 |
if (con == 0) |
2 |
{ |
3 |
throwernumber = instance_number(object_index); |
4 |
con = 12; |
5 |
movecon = 4; |
6 |
timer = 0; |
7 |
thrown = 0; |
8 |
image_index = 0; |
9 |
} |
10 |
if (movecon == 4) |
11 |
{ |
12 |
movesiner += 1; |
13 |
if (global.turntimer >= 30) |
14 |
{ |
15 |
if (movefactor < 1) |
16 |
movefactor += 0.1; |
17 |
} |
18 |
y = ystart + (sin(movesiner / 16) * 40 * movefactor); |
19 |
if (global.turntimer <= 30) |
20 |
{ |
21 |
if (movefactor > 0) |
22 |
movefactor -= 0.1; |
23 |
else |
24 |
movefactor = 0; |
25 |
} |
26 |
} |
27 |
if (con == 10) |
28 |
{ |
29 |
timer = 0; |
30 |
thrown = 0; |
31 |
image_index = 0; |
32 |
if (global.turntimer > 15) |
33 |
con = 11; |
34 |
} |
35 |
if (con == 11) |
36 |
{ |
37 |
image_index += 0.334; |
38 |
if (image_index >= 4 && thrown == 0) |
39 |
{ |
40 |
swordbullet = instance_create(x + 6, y + 34, obj_regularbullet); |
41 |
swordbullet.siner = movesiner; |
42 |
scr_bullet_inheritscr_bullet_inheritfunction scr_bullet_inherit(arg0)
{
if (instance_exists(arg0))
{
arg0.damage = damage;
arg0.grazepoints = grazepoints;
arg0.timepoints = timepoints;
arg0.inv = inv;
arg0.target = target;
arg0.grazed = 0;
arg0.grazetimer = 0;
}
} (swordbullet); |
43 |
swordbullet.throwernumber = throwernumber; |
44 |
with (swordbullet) |
45 |
{ |
46 |
active = 1; |
47 |
sprite_index = spr_diamondswordbullet; |
48 |
image_xscale = 2; |
49 |
image_yscale = 2; |
50 |
move_towards_point(obj_heart.x + 8, obj_heart.y + 8, 9 + (sin(siner / 10) * 4)); |
51 |
if (throwernumber == 2) |
52 |
speed *= 0.85; |
53 |
if (throwernumber == 3) |
54 |
speed *= 0.7; |
55 |
direction += (5 - random(10)); |
56 |
image_angle = direction; |
57 |
} |
58 |
swordbullet.depth = depth + 1; |
59 |
thrown = 1; |
60 |
} |
61 |
if (image_index >= 6) |
62 |
{ |
63 |
con = 12; |
64 |
timer = 0; |
65 |
} |
66 |
} |
67 |
if (con == 12) |
68 |
{ |
69 |
timer += 1; |
70 |
if (timer >= (throwernumber * 3)) |
71 |
con = 10; |
72 |
} |