1 |
scr_depth_alt(); |
2 |
a = scr_afterimagescr_afterimagefunction scr_afterimage()
{
afterimage = instance_create(x, y, obj_afterimage);
afterimage.sprite_index = sprite_index;
afterimage.image_index = image_index;
afterimage.image_blend = image_blend;
afterimage.image_speed = 0;
afterimage.depth = depth;
afterimage.image_xscale = image_xscale;
afterimage.image_yscale = image_yscale;
afterimage.image_angle = image_angle;
return afterimage;
} (); |
3 |
a.x += deshspeed; |
4 |
a.image_alpha = image_alpha * 0.5; |
5 |
a.fadeSpeed = 0.15; |
6 |
a.depth = depth + 10; |
7 |
if (init == 0) |
8 |
{ |
9 |
if (dir == "left") |
10 |
deshspeed = -12; |
11 |
if (dir == "right") |
12 |
deshspeed = 12; |
13 |
hspeed = 0.1 * sign(deshspeed); |
14 |
image_xscale = 2 * sign(deshspeed) * -1; |
15 |
init = 1; |
16 |
image_alpha = 0; |
17 |
} |
18 |
if (hspeed < abs(deshspeed)) |
19 |
hspeed *= 1.5; |
20 |
hspeed = clamp(hspeed, -abs(deshspeed), abs(deshspeed)); |
21 |
if (con == 0) |
22 |
{ |
23 |
image_alpha = image_yscale / 2; |
24 |
image_yscale *= 1.3; |
25 |
if (image_yscale >= 2) |
26 |
{ |
27 |
image_yscale = 2; |
28 |
con++; |
29 |
} |
30 |
} |
31 |
if (place_meeting(x, y, obj_solidenemy) || x > (room_width + sprite_width) || x < (0 - sprite_width)) |
32 |
{ |
33 |
active = 0; |
34 |
fadeaway = 1; |
35 |
} |
36 |
if (fadeaway == 1) |
37 |
{ |
38 |
image_alpha *= 0.6; |
39 |
active = 0; |
40 |
if (image_alpha <= 0.01) |
41 |
instance_destroy(); |
42 |
} |