1 |
t += 1; |
2 |
if (i_ex(target)) |
3 |
{ |
4 |
if (t == 1) |
5 |
{ |
6 |
x = target.x; |
7 |
y = target.y; |
8 |
image_xscale = target.image_xscale; |
9 |
image_yscale = target.image_yscale; |
10 |
sprite_index = target.sprite_index; |
11 |
sw = sprite_width; |
12 |
sh = sprite_height; |
13 |
herocheck = 0; |
14 |
if (target.object_index == obj_herokris) |
15 |
herocheck = 1; |
16 |
if (target.object_index == obj_herosusie) |
17 |
herocheck = 1; |
18 |
if (target.object_index == obj_heroralsei) |
19 |
herocheck = 1; |
20 |
if (herocheck == 1) |
21 |
{ |
22 |
sw = target.mywidth; |
23 |
sh = target.myheight; |
24 |
} |
25 |
with (target) |
26 |
scr_oflashscr_oflashfunction scr_oflash()
{
_oflash = instance_create(x, y, obj_oflash);
_oflash.image_xscale = image_xscale;
_oflash.image_speed = 0;
_oflash.image_index = image_index;
_oflash.image_yscale = image_yscale;
if (global.chapter == 2 && object_index == obj_mauswheel_enemy)
_oflash.sprite_index = spr_mauswheel_idle;
else
_oflash.sprite_index = sprite_index;
_oflash.depth = depth - 1;
_oflash.target = id;
return _oflash;
} (); |
27 |
if (global.chapter == 2 && target.object_index == obj_kk_enemy) |
28 |
{ |
29 |
with (obj_oflash) |
30 |
{ |
31 |
x += 18; |
32 |
y += 18; |
33 |
} |
34 |
} |
35 |
if (global.chapter == 2 && target.object_index == o_boxingcontroller) |
36 |
{ |
37 |
obj_oflash.image_xscale = -2; |
38 |
_oflash = instance_create(x, y, obj_oflash); |
39 |
_oflash.image_speed = 0; |
40 |
_oflash.image_index = o_boxingcontroller.image_index; |
41 |
_oflash.image_xscale = -2; |
42 |
_oflash.image_yscale = 2; |
43 |
_oflash.sprite_index = o_boxingcontroller.headsprite; |
44 |
_oflash.depth = depth - 1; |
45 |
} |
46 |
} |
47 |
if (t >= 1 && t <= 5) |
48 |
{ |
49 |
for (i = 0; i < 2; i += 1) |
50 |
{ |
51 |
if (global.chapter == 2 && target.object_index == o_boxingcontroller) |
52 |
star[starcount] = instance_create((x - (sw / 2)) + random(sw), y - random(sh), obj_marker); |
53 |
else |
54 |
star[starcount] = instance_create(x + random(sw), y + random(sh), obj_marker); |
55 |
with (star[starcount]) |
56 |
{ |
57 |
image_angle = random(360); |
58 |
depth = -10; |
59 |
image_xscale = 2; |
60 |
image_yscale = 2; |
61 |
image_alpha = 2; |
62 |
image_speed = 0.25; |
63 |
hspeed = 2 - random(2); |
64 |
vspeed = -3 - random(2); |
65 |
friction = 0.2; |
66 |
} |
67 |
star[starcount].sprite_index = particlesprite; |
68 |
star[starcount].image_blend = particlecolor; |
69 |
starcount += 1; |
70 |
} |
71 |
} |
72 |
if (t >= 5 && t <= 30) |
73 |
{ |
74 |
for (i = 0; i < starcount; i += 1) |
75 |
{ |
76 |
with (star[i]) |
77 |
{ |
78 |
image_angle -= 10; |
79 |
image_alpha -= 0.1; |
80 |
if (image_alpha <= 0) |
81 |
instance_destroy(); |
82 |
} |
83 |
} |
84 |
if (t >= 30) |
85 |
instance_destroy(); |
86 |
} |
87 |
} |
88 |
else |
89 |
{ |
90 |
for (i = 0; i < starcount; i += 1) |
91 |
{ |
92 |
with (star[i]) |
93 |
instance_destroy(); |
94 |
} |
95 |
instance_destroy(); |
96 |
} |