1 |
if (actual == 0) |
2 |
{ |
3 |
siner += 1; |
4 |
dir += 2; |
5 |
xdir = dir + 180; |
6 |
if (norot == 1) |
7 |
{ |
8 |
for (i = 0; i < 20; i += 1) |
9 |
{ |
10 |
t = ((i * 2 * pi) / 20) + (siner / 60); |
11 |
xx = 16 * (sin(t) * sin(t) * sin(t)); |
12 |
yy = (13 * cos(t)) - (5 * cos(2 * t)) - (2 * cos(3 * t)) - cos(4 * t); |
13 |
xxx = obj_heart_ch1.x + 8 + (xx * radius); |
14 |
yyy = (obj_heart_ch1.y + 8) - (yy * radius); |
15 |
draw_sprite(spr_heartbullet_ch1, 0, xxx, yyy); |
16 |
} |
17 |
} |
18 |
} |
19 |
if (actual == 1) |
20 |
{ |
21 |
if (made == 0) |
22 |
{ |
23 |
for (t = 0; t < 16; t += 1) |
24 |
{ |
25 |
bul[t] = instance_create_ch1(-20, -20, obj_regularbullet_permanent_ch1); |
26 |
bul[t].damage = damage; |
27 |
with (bul[t]) |
28 |
{ |
29 |
grazepoints = 2; |
30 |
timepoints = 1; |
31 |
depth = 0; |
32 |
image_alpha = 0; |
33 |
sprite_index = spr_heartbullet_ch1; |
34 |
} |
35 |
} |
36 |
made = 1; |
37 |
} |
38 |
if (type == 0) |
39 |
{ |
40 |
if (radius > maxradius) |
41 |
radius -= 5; |
42 |
else |
43 |
radius += (sin(siner / 10) / 2); |
44 |
} |
45 |
if (type == 1) |
46 |
{ |
47 |
if (radius > maxradius && radcon == 0) |
48 |
{ |
49 |
radius -= 4; |
50 |
} |
51 |
else |
52 |
{ |
53 |
radcon = 1; |
54 |
radius += 8; |
55 |
active = 0; |
56 |
image_alpha -= 0.1; |
57 |
} |
58 |
} |
59 |
dir += 2; |
60 |
siner += 1.5; |
61 |
tcount = 0; |
62 |
for (t = 0; t < 16; t += 1) |
63 |
{ |
64 |
if (instance_exists(bul[t])) |
65 |
{ |
66 |
tcount += 1; |
67 |
if (radcon == 0) |
68 |
{ |
69 |
with (bul[t]) |
70 |
{ |
71 |
if (image_alpha < 1) |
72 |
image_alpha += 0.1; |
73 |
} |
74 |
} |
75 |
xx = sin(((pi * t) / 8) + (siner / 20)) * radius; |
76 |
yy = cos(((pi * t) / 8) + (siner / 20)) * radius; |
77 |
xxx = thisx + 8 + xx; |
78 |
yyy = (thisy + 8) - yy; |
79 |
bul[t].x = xxx; |
80 |
bul[t].y = yyy; |
81 |
if (radcon == 1) |
82 |
{ |
83 |
with (bul[t]) |
84 |
{ |
85 |
image_alpha -= 0.1; |
86 |
active = 0; |
87 |
if (image_alpha <= 0.1) |
88 |
instance_destroy(); |
89 |
} |
90 |
} |
91 |
} |
92 |
} |
93 |
if (tcount == 0) |
94 |
instance_destroy(); |
95 |
} |