1 |
if (chaincon == 0) |
2 |
chaincon = 1; |
3 |
if (chaincon == 1) |
4 |
{ |
5 |
chaincon = 2; |
6 |
chaintimer = 0; |
7 |
} |
8 |
if (chaincon == 2) |
9 |
{ |
10 |
image_angle = direction; |
11 |
chaintimer += 1; |
12 |
if (chaintimer >= chainrate) |
13 |
{ |
14 |
chain[chain_number] = instance_create(x, y, obj_chainpiece); |
15 |
chain[chain_number].image_angle = image_angle; |
16 |
chain_max += 1; |
17 |
chain_number += 1; |
18 |
chaintimer = 0; |
19 |
} |
20 |
if (path_position >= 1) |
21 |
{ |
22 |
path_speed = 0; |
23 |
shakeamt = 12; |
24 |
remx = obj_heart.x; |
25 |
remy = obj_heart.y; |
26 |
remx_box = obj_growtangle.x; |
27 |
remy_box = obj_growtangle.y; |
28 |
chaincon = 2.1; |
29 |
} |
30 |
if (type == 88) |
31 |
{ |
32 |
btimer += 1; |
33 |
if (btimer >= 2 && path_position <= 0.8) |
34 |
{ |
35 |
cchoice = choose(-1, 0, 1); |
36 |
ychoice = lengthdir_x(36, image_angle); |
37 |
xchoice = lengthdir_y(36, image_angle); |
38 |
bul = instance_create(x + (xchoice * cchoice), y + (ychoice * cchoice), obj_collidebullet); |
39 |
bul.active = 1; |
40 |
bul.sprite_index = spr_spadebullet; |
41 |
bul.image_angle = image_angle; |
42 |
btimer = 0; |
43 |
} |
44 |
} |
45 |
} |
46 |
if (chaincon == 2.1) |
47 |
{ |
48 |
obj_heart.x = remx; |
49 |
obj_heart.y = remy; |
50 |
obj_growtangle.x = remx_box; |
51 |
obj_growtangle.y = remy_box; |
52 |
shakedir = random(360); |
53 |
xshake = lengthdir_x(shakeamt, shakedir); |
54 |
yshake = lengthdir_y(shakeamt, shakedir); |
55 |
obj_heart.x += xshake; |
56 |
obj_heart.y += yshake; |
57 |
obj_growtangle.x += xshake; |
58 |
obj_growtangle.y += yshake; |
59 |
shakeamt -= 2; |
60 |
if (shakeamt < 0) |
61 |
chaincon = 3; |
62 |
} |
63 |
if (chaincon == 3) |
64 |
{ |
65 |
chaincon = 5; |
66 |
smashtime = 1; |
67 |
bullettimer = 0; |
68 |
} |
69 |
if (chaincon == 5) |
70 |
{ |
71 |
bullettimer += 1; |
72 |
if (bullettimer >= 30) |
73 |
chaincon = 6; |
74 |
} |
75 |
if (chaincon == 6) |
76 |
{ |
77 |
path_start(mypath2, maxspeed / factor, path_action_stop, 0); |
78 |
if (instance_exists(obj_growtangle)) |
79 |
{ |
80 |
obj_growtangle.maxspeed = maxspeed; |
81 |
obj_growtangle.mypath2 = mypath2; |
82 |
obj_growtangle.factor = factor; |
83 |
with (obj_growtangle) |
84 |
path_start(mypath2, maxspeed / factor, path_action_stop, 0); |
85 |
} |
86 |
chain_number -= 1; |
87 |
chain_max -= 1; |
88 |
framerule = 0; |
89 |
if (chainrate == 1) |
90 |
{ |
91 |
with (chain[chain_number]) |
92 |
instance_destroy(); |
93 |
chain_number -= 1; |
94 |
chain_max -= 1; |
95 |
} |
96 |
chaincon = 10; |
97 |
} |
98 |
if (chaincon == 10) |
99 |
{ |
100 |
if (path_position >= 0.8) |
101 |
smashtime = 0; |
102 |
if (framerule == 1) |
103 |
image_angle = direction + 180; |
104 |
framerule = 1; |
105 |
chaintimer -= 1; |
106 |
if (chaintimer <= 0) |
107 |
{ |
108 |
chaintimer = chainrate * factor; |
109 |
if (chain_number >= 0) |
110 |
{ |
111 |
with (chain[chain_number]) |
112 |
instance_destroy(); |
113 |
chain_number -= 1; |
114 |
chain_max -= 1; |
115 |
} |
116 |
} |
117 |
if (path_position >= 1) |
118 |
chaincon = 11; |
119 |
} |
120 |
if (chaincon == 11) |
121 |
{ |
122 |
} |
123 |
if (smashtime == 1) |
124 |
{ |
125 |
if (type == 0) |
126 |
{ |
127 |
btimer += 1; |
128 |
if (btimer == 10) |
129 |
{ |
130 |
for (i = 0; i < 1; i += 1) |
131 |
{ |
132 |
regbul = instance_create(__view_get(e__VW.XView, 0) + 320 + (i * 120), __view_get(e__VW.YView, 0) - 20, obj_regularbullet); |
133 |
regbul.vspeed = 2; |
134 |
regbul.gravity = 0.2; |
135 |
regbul.sprite_index = spr_spadebullet; |
136 |
regbul.image_angle = 270; |
137 |
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;
}
} (regbul); |
138 |
} |
139 |
} |
140 |
if (btimer >= 20) |
141 |
{ |
142 |
btimer = 0; |
143 |
for (i = 0; i < 2; i += 1) |
144 |
{ |
145 |
regbul = instance_create(__view_get(e__VW.XView, 0) + 260 + (i * 120), __view_get(e__VW.YView, 0) - 20, obj_regularbullet); |
146 |
regbul.vspeed = 2; |
147 |
regbul.gravity = 0.2; |
148 |
regbul.sprite_index = spr_spadebullet; |
149 |
regbul.image_angle = 270; |
150 |
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;
}
} (regbul); |
151 |
} |
152 |
} |
153 |
} |
154 |
} |
155 |
|
156 |
enum e__VW |
157 |
{ |
158 |
XView, |
159 |
YView, |
160 |
WView, |
161 |
HView, |
162 |
Angle, |
163 |
HBorder, |
164 |
VBorder, |
165 |
HSpeed, |
166 |
VSpeed, |
167 |
Object, |
168 |
Visible, |
169 |
XPort, |
170 |
YPort, |
171 |
WPort, |
172 |
HPort, |
173 |
Camera, |
174 |
SurfaceID |
175 |
} |