1 |
if (basic == 1) |
2 |
{ |
3 |
cl = distance_to_object(obj_mainchara); |
4 |
if (cl > 40) |
5 |
cl = 40; |
6 |
if (cl < 10) |
7 |
cl = 10; |
8 |
image_alpha = 1 - ((cl - 10) / 30); |
9 |
} |
10 |
if (image_yscale > 1) |
11 |
{ |
12 |
for (i = 0; i < image_yscale; i += 1) |
13 |
{ |
14 |
done = 0; |
15 |
if (i == 0) |
16 |
{ |
17 |
draw_sprite_ext(spr_forcefield_top, siner / 3, x, y + (i * 20), 1, 1, 0, c_white, image_alpha); |
18 |
done = 1; |
19 |
} |
20 |
if (i > 0 && done == 0) |
21 |
{ |
22 |
if ((i + 1) >= image_yscale) |
23 |
draw_sprite_ext(spr_forcefield_top, siner / 3, x, y + (i * 20) + 20, 1, -1, 0, c_white, image_alpha); |
24 |
else |
25 |
draw_sprite_ext(spr_forcefield_middle, siner / 3, x, y + (i * 20), 1, 1, 0, c_white, image_alpha); |
26 |
done = 1; |
27 |
} |
28 |
} |
29 |
} |
30 |
if (image_xscale > 1) |
31 |
{ |
32 |
for (j = 0; j < image_xscale; j += 1) |
33 |
{ |
34 |
done = 0; |
35 |
if (j == 0) |
36 |
{ |
37 |
draw_sprite_ext(spr_forcefield_right, siner / 3, x + (j * 20), y, 1, 1, 0, c_white, image_alpha); |
38 |
done = 1; |
39 |
} |
40 |
if (j > 0 && done == 0) |
41 |
{ |
42 |
if ((j + 1) >= image_xscale) |
43 |
draw_sprite_ext(spr_forcefield_right, siner / 3, x + (j * 20) + 20, y, -1, 1, 0, c_white, image_alpha); |
44 |
else |
45 |
draw_sprite_ext(spr_forcefield_right_middle, siner / 3, x + (j * 20) + 20, y, -1, 1, 0, c_white, image_alpha); |
46 |
done = 1; |
47 |
} |
48 |
} |
49 |
} |
50 |
siner += 1; |