1 |
if (HeroID == 0 && instance_exists(obj_herokris)) |
2 |
{ |
3 |
depth = 80; |
4 |
obj_herokris.depth = depth + 1; |
5 |
} |
6 |
if (HeroID == 1 && instance_exists(obj_herosusie)) |
7 |
{ |
8 |
depth = 75; |
9 |
obj_herosusie.depth = depth + 1; |
10 |
} |
11 |
if (HeroID == 2 && instance_exists(obj_heroralsei)) |
12 |
{ |
13 |
depth = 70; |
14 |
obj_heroralsei.depth = depth + 1; |
15 |
} |
16 |
back.x = x; |
17 |
back.y = y + 8; |
18 |
var xx = 0; |
19 |
var yy = 0; |
20 |
if (sprite_index == spr_krisb_idle) |
21 |
{ |
22 |
xx = 4; |
23 |
yy = -11; |
24 |
} |
25 |
else if (sprite_index == spr_krisb_attack) |
26 |
{ |
27 |
xx = 0; |
28 |
yy = 8; |
29 |
} |
30 |
else if (sprite_index == spr_krisb_attackready) |
31 |
{ |
32 |
xx = 0; |
33 |
yy = 8; |
34 |
} |
35 |
else if (sprite_index == spr_susie_idle) |
36 |
{ |
37 |
xx = 0; |
38 |
yy = -9; |
39 |
} |
40 |
else if (sprite_index == spr_susieb_idle) |
41 |
{ |
42 |
xx = 0; |
43 |
yy = -9; |
44 |
} |
45 |
else if (sprite_index == spr_susieb_itemready) |
46 |
{ |
47 |
xx = 0; |
48 |
yy = -9; |
49 |
} |
50 |
else if (sprite_index == spr_susieb_item) |
51 |
{ |
52 |
xx = 0; |
53 |
yy = -9; |
54 |
} |
55 |
else if (sprite_index == spr_ralsei_idle) |
56 |
{ |
57 |
xx = -12; |
58 |
yy = -9; |
59 |
} |
60 |
else if (sprite_index == spr_ralsei_spell) |
61 |
{ |
62 |
xx = -12; |
63 |
yy = -9; |
64 |
} |
65 |
else if (sprite_index == spr_ralsei_spellready) |
66 |
{ |
67 |
xx = -12; |
68 |
yy = -9; |
69 |
} |
70 |
else if (sprite_index == spr_ralsei_act) |
71 |
{ |
72 |
xx = -12; |
73 |
yy = 0; |
74 |
} |
75 |
else if (sprite_index == spr_ralsei_walk_right) |
76 |
{ |
77 |
xx = 0; |
78 |
yy = -16; |
79 |
} |
80 |
else if (sprite_index == spr_ralsei_right) |
81 |
{ |
82 |
xx = 0; |
83 |
yy = -16; |
84 |
} |
85 |
else if (sprite_index == spr_krisb_victory) |
86 |
{ |
87 |
xx = 0; |
88 |
yy = -11; |
89 |
} |
90 |
else if (sprite_index == spr_ralsei_victory) |
91 |
{ |
92 |
xx = 0; |
93 |
yy = -9; |
94 |
} |
95 |
else if (sprite_index == spr_krisr_dark) |
96 |
{ |
97 |
xx = 5; |
98 |
yy = -10; |
99 |
} |
100 |
else if (sprite_index == spr_susie_right_dw) |
101 |
{ |
102 |
xx = 10; |
103 |
yy = -13; |
104 |
} |
105 |
else if (sprite_index == spr_ralsei_walk_right) |
106 |
{ |
107 |
xx = 1; |
108 |
yy = -2; |
109 |
} |
110 |
else |
111 |
{ |
112 |
xx = 0; |
113 |
yy = 0; |
114 |
} |
115 |
if (HeroID == 1) |
116 |
xx = xx - 10; |
117 |
var a = 2; |
118 |
if (sprite_index == spr_susieb_actready) |
119 |
a = 1.5; |
120 |
if (sprite_index == spr_susieb_act) |
121 |
a = 1.5; |
122 |
if (sprite_index == spr_susieb_attackready) |
123 |
a = 1.5; |
124 |
if (sprite_index == spr_susieb_attack) |
125 |
a = 1.5; |
126 |
if (sprite_index == spr_susieb_defend) |
127 |
a = 1.5; |
128 |
if (sprite_index == spr_susie_rudebuster) |
129 |
a = 1.5; |
130 |
if (sprite_index == spr_susie_spell) |
131 |
a = 1.5; |
132 |
if (sprite_index == spr_susie_spellready) |
133 |
a = 1.5; |
134 |
if (sprite_index == spr_susie_actready) |
135 |
a = 1.5; |
136 |
if (sprite_index == spr_susie_act) |
137 |
a = 1.5; |
138 |
if (sprite_index == spr_susie_attackready) |
139 |
a = 1.5; |
140 |
if (sprite_index == spr_susie_attack) |
141 |
a = 1.5; |
142 |
if (sprite_index == spr_susie_defend) |
143 |
a = 1.5; |
144 |
userealsprite = 0; |
145 |
if (HeroID == 0) |
146 |
{ |
147 |
if (sprite_index == spr_krisb_hurt) |
148 |
{ |
149 |
obj_herokris.x = x + 20 + xx; |
150 |
obj_herokris.y = (y - (sprite_get_height(sprite_index) * a)) + yy + 8; |
151 |
userealsprite = 1; |
152 |
obj_herokris.depth = depth + 1; |
153 |
} |
154 |
else if (sprite_index == spr_krisb_idle && dontshowherosprite < 1) |
155 |
{ |
156 |
obj_herokris.x = x + 20 + xx; |
157 |
obj_herokris.y = (y - (sprite_get_height(sprite_index) * a)) + yy + 8; |
158 |
userealsprite = 1; |
159 |
obj_herokris.depth = depth + 1; |
160 |
} |
161 |
else if (sprite_index == spr_krisb_defend) |
162 |
{ |
163 |
obj_herokris.x = x + 20 + xx; |
164 |
obj_herokris.y = (y - (sprite_get_height(sprite_index) * a)) + yy + 8; |
165 |
userealsprite = 1; |
166 |
obj_herokris.depth = depth + 1; |
167 |
} |
168 |
else if (sprite_index == spr_krisb_item) |
169 |
{ |
170 |
obj_herokris.x = x + 20 + xx; |
171 |
obj_herokris.y = (y - (sprite_get_height(sprite_index) * a)) + yy + 8; |
172 |
userealsprite = 1; |
173 |
obj_herokris.depth = depth + 1; |
174 |
} |
175 |
else if (sprite_index == spr_krisb_itemready) |
176 |
{ |
177 |
obj_herokris.x = x + 20 + xx; |
178 |
obj_herokris.y = (y - (sprite_get_height(sprite_index) * a)) + yy + 8; |
179 |
userealsprite = 1; |
180 |
obj_herokris.depth = depth + 1; |
181 |
} |
182 |
else if (sprite_index == spr_krisb_actready) |
183 |
{ |
184 |
obj_herokris.x = x + 20 + xx; |
185 |
obj_herokris.y = (y - (sprite_get_height(sprite_index) * a)) + yy + 8; |
186 |
userealsprite = 1; |
187 |
obj_herokris.depth = depth + 1; |
188 |
} |
189 |
else if (sprite_index == spr_krisb_attackready) |
190 |
{ |
191 |
obj_herokris.x = x + 20 + xx; |
192 |
obj_herokris.y = (y - (sprite_get_height(sprite_index) * a)) + yy + 8; |
193 |
userealsprite = 1; |
194 |
obj_herokris.depth = depth + 1; |
195 |
} |
196 |
else if (sprite_index == spr_krisb_attack) |
197 |
{ |
198 |
obj_herokris.x = x + 20 + xx; |
199 |
obj_herokris.y = (y - (sprite_get_height(sprite_index) * a)) + yy + 8; |
200 |
userealsprite = 1; |
201 |
obj_herokris.depth = depth + 1; |
202 |
} |
203 |
else if (dontshowherosprite > 0) |
204 |
{ |
205 |
dontshowherosprite--; |
206 |
userealsprite = 0; |
207 |
} |
208 |
else |
209 |
{ |
210 |
obj_herokris.x = camerax() - 300; |
211 |
} |
212 |
} |
213 |
if (HeroID == 1 && instance_exists(obj_herosusie)) |
214 |
{ |
215 |
if (sprite_index == spr_susie_hurt) |
216 |
{ |
217 |
obj_herosusie.x = x + 20 + xx; |
218 |
obj_herosusie.y = (y - (sprite_get_height(sprite_index) * a)) + yy + 8; |
219 |
userealsprite = 1; |
220 |
obj_herosusie.depth = depth + 1; |
221 |
} |
222 |
else if (sprite_index == spr_susieb_idle && dontshowherosprite < 1) |
223 |
{ |
224 |
obj_herosusie.x = x + 20 + xx; |
225 |
obj_herosusie.y = (y - (sprite_get_height(sprite_index) * a)) + yy + 8; |
226 |
userealsprite = 1; |
227 |
obj_herosusie.depth = depth + 1; |
228 |
} |
229 |
else if (sprite_index == spr_susieb_hurt) |
230 |
{ |
231 |
obj_herosusie.x = x + 20 + xx; |
232 |
obj_herosusie.y = (y - (sprite_get_height(sprite_index) * a)) + yy + 8; |
233 |
userealsprite = 1; |
234 |
obj_herosusie.depth = depth + 1; |
235 |
} |
236 |
else if (obj_herosusie.hurt > 0) |
237 |
{ |
238 |
obj_herosusie.x = x + 20 + xx; |
239 |
obj_herosusie.y = (y - (sprite_get_height(sprite_index) * a)) + yy + 8; |
240 |
userealsprite = 1; |
241 |
obj_herosusie.depth = depth + 1; |
242 |
} |
243 |
else if (sprite_index == spr_susieb_defend) |
244 |
{ |
245 |
obj_herosusie.x = x + 20 + xx; |
246 |
obj_herosusie.y = (y - (sprite_get_height(sprite_index) * a)) + yy + 8; |
247 |
userealsprite = 1; |
248 |
obj_herosusie.depth = depth + 1; |
249 |
} |
250 |
else if (sprite_index == spr_susie_rudebuster) |
251 |
{ |
252 |
obj_herosusie.x = x + 20 + xx; |
253 |
obj_herosusie.y = (y - (sprite_get_height(sprite_index) * a)) + yy + 8; |
254 |
userealsprite = 1; |
255 |
obj_herosusie.depth = depth + 1; |
256 |
} |
257 |
else if (instance_exists(obj_rudebuster_anim)) |
258 |
{ |
259 |
obj_rudebuster_anim.x = x + 20 + xx; |
260 |
obj_rudebuster_anim.y = (y - (sprite_get_height(sprite_index) * a)) + yy + 64; |
261 |
obj_herosusie.x = x + 20 + xx; |
262 |
obj_herosusie.y = (y - (sprite_get_height(sprite_index) * a)) + yy + 24; |
263 |
userealsprite = 1; |
264 |
obj_herosusie.depth = depth + 1; |
265 |
} |
266 |
else if (sprite_index == spr_susieb_spell) |
267 |
{ |
268 |
obj_herosusie.x = x + 20 + xx; |
269 |
obj_herosusie.y = (y - (sprite_get_height(sprite_index) * a)) + yy + 64; |
270 |
userealsprite = 1; |
271 |
obj_herosusie.depth = depth + 1; |
272 |
} |
273 |
else if (sprite_index == spr_susieb_spellready) |
274 |
{ |
275 |
obj_herosusie.x = x + 20 + xx; |
276 |
obj_herosusie.y = (y - (sprite_get_height(sprite_index) * a)) + yy + 27; |
277 |
userealsprite = 1; |
278 |
obj_herosusie.depth = depth + 1; |
279 |
} |
280 |
else if (sprite_index == spr_susieb_actready) |
281 |
{ |
282 |
obj_herosusie.x = x + 20 + xx; |
283 |
obj_herosusie.y = (y - (sprite_get_height(sprite_index) * a)) + yy + 8; |
284 |
userealsprite = 1; |
285 |
obj_herosusie.depth = depth + 1; |
286 |
} |
287 |
else if (sprite_index == spr_susieb_itemready) |
288 |
{ |
289 |
obj_herosusie.x = x + 20 + xx; |
290 |
obj_herosusie.y = (y - (sprite_get_height(sprite_index) * a)) + yy + 8; |
291 |
userealsprite = 1; |
292 |
obj_herosusie.depth = depth + 1; |
293 |
} |
294 |
else if (sprite_index == spr_susieb_item) |
295 |
{ |
296 |
obj_herosusie.x = x + 20 + xx; |
297 |
obj_herosusie.y = (y - (sprite_get_height(sprite_index) * a)) + yy + 8; |
298 |
userealsprite = 1; |
299 |
obj_herosusie.depth = depth + 1; |
300 |
} |
301 |
else if (sprite_index == spr_susieb_attackready) |
302 |
{ |
303 |
obj_herosusie.x = x + 20 + xx; |
304 |
obj_herosusie.y = (y - (sprite_get_height(sprite_index) * a)) + yy + 8; |
305 |
userealsprite = 1; |
306 |
obj_herosusie.depth = depth + 1; |
307 |
} |
308 |
else if (sprite_index == spr_susieb_attack) |
309 |
{ |
310 |
obj_herosusie.x = x + 20 + xx; |
311 |
obj_herosusie.y = (y - (sprite_get_height(sprite_index) * a)) + yy + 8; |
312 |
userealsprite = 1; |
313 |
obj_herosusie.depth = depth + 1; |
314 |
} |
315 |
else if (dontshowherosprite > 0) |
316 |
{ |
317 |
dontshowherosprite--; |
318 |
userealsprite = 0; |
319 |
} |
320 |
else |
321 |
{ |
322 |
obj_herosusie.x = camerax() - 300; |
323 |
} |
324 |
} |
325 |
if (HeroID == 2 && instance_exists(obj_heroralsei)) |
326 |
{ |
327 |
if (sprite_index == spr_ralsei_idle && dontshowherosprite < 1) |
328 |
{ |
329 |
obj_heroralsei.x = x + 20 + xx; |
330 |
obj_heroralsei.y = (y - (sprite_get_height(sprite_index) * a)) + yy + 8; |
331 |
userealsprite = 1; |
332 |
obj_heroralsei.depth = depth + 1; |
333 |
} |
334 |
else if (sprite_index == spr_ralsei_hurt_fixed) |
335 |
{ |
336 |
obj_heroralsei.x = x + 20 + xx; |
337 |
obj_heroralsei.y = (y - (sprite_get_height(sprite_index) * a)) + yy + 8; |
338 |
userealsprite = 1; |
339 |
obj_heroralsei.depth = depth + 1; |
340 |
} |
341 |
else if (sprite_index == spr_ralsei_defend) |
342 |
{ |
343 |
obj_heroralsei.x = x + 10 + xx; |
344 |
obj_heroralsei.y = (y - (sprite_get_height(sprite_index) * a)) + yy + 8; |
345 |
userealsprite = 1; |
346 |
obj_heroralsei.depth = depth + 1; |
347 |
} |
348 |
else if (sprite_index == spr_ralsei_item) |
349 |
{ |
350 |
obj_heroralsei.x = x + 20 + xx; |
351 |
obj_heroralsei.y = (y - (sprite_get_height(sprite_index) * a)) + yy + 8; |
352 |
userealsprite = 1; |
353 |
obj_heroralsei.depth = depth + 1; |
354 |
} |
355 |
else if (sprite_index == spr_ralsei_itemready) |
356 |
{ |
357 |
obj_heroralsei.x = x + 20 + xx; |
358 |
obj_heroralsei.y = (y - (sprite_get_height(sprite_index) * a)) + yy + 8; |
359 |
userealsprite = 1; |
360 |
obj_heroralsei.depth = depth + 1; |
361 |
} |
362 |
else if (sprite_index == spr_ralsei_spell) |
363 |
{ |
364 |
obj_heroralsei.x = x + 20 + xx; |
365 |
obj_heroralsei.y = (y - (sprite_get_height(sprite_index) * a)) + yy + 8; |
366 |
userealsprite = 1; |
367 |
obj_heroralsei.depth = depth + 1; |
368 |
} |
369 |
else if (sprite_index == spr_ralsei_spellready) |
370 |
{ |
371 |
obj_heroralsei.x = x + 20 + xx; |
372 |
obj_heroralsei.y = (y - (sprite_get_height(sprite_index) * a)) + yy + 8; |
373 |
userealsprite = 1; |
374 |
obj_heroralsei.depth = depth + 1; |
375 |
} |
376 |
else if (dontshowherosprite > 0) |
377 |
{ |
378 |
dontshowherosprite--; |
379 |
userealsprite = 0; |
380 |
} |
381 |
else |
382 |
{ |
383 |
obj_heroralsei.x = camerax() - 300; |
384 |
} |
385 |
if (obj_heroralsei.sprite_index == spr_ralsei_idle && sprite_index == spr_ralsei_spell) |
386 |
{ |
387 |
obj_heroralsei.x = x + 20 + xx; |
388 |
obj_heroralsei.y = (y - (sprite_get_height(sprite_index) * a)) + yy; |
389 |
userealsprite = 1; |
390 |
obj_heroralsei.depth = depth + 1; |
391 |
} |
392 |
} |
393 |
if (sprite_index == spr_krisb_attack && image_index > 6.5 && forceact == 1 && introanim == 1) |
394 |
{ |
395 |
sprite_index = spr_krisb_idle; |
396 |
image_speed = 0; |
397 |
image_index = 0; |
398 |
forceact = 0; |
399 |
introanim = 0; |
400 |
} |
401 |
if (sprite_index == spr_susie_attack && image_index > 3.5 && forceact == 1 && introanim == 1) |
402 |
{ |
403 |
sprite_index = spr_susieb_idle; |
404 |
image_speed = 0; |
405 |
image_index = 0; |
406 |
forceact = 0; |
407 |
introanim = 0; |
408 |
} |
409 |
if (sprite_index == spr_ralsei_battleintro && image_index > 10 && forceact == 1 && introanim == 1) |
410 |
{ |
411 |
sprite_index = spr_ralsei_idle; |
412 |
image_speed = 0; |
413 |
image_index = 9; |
414 |
forceact = 0; |
415 |
introanim = 0; |
416 |
} |