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(argument0) //gml_Script_scr_bullet_inherit
{
if i_ex(argument0)
{
if (damage != -1)
argument0.damage = damage
if (grazepoints != -1)
argument0.grazepoints = grazepoints
if (timepoints != -1)
argument0.timepoints = timepoints
if (inv != -1)
argument0.inv = inv
if (target != -1)
argument0.target = target
if (grazed != -1)
argument0.grazed = 0
if (grazetimer != -1)
argument0.grazetimer = 0
argument0.element = element
}
} (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 |
} |