1 |
function scr_unmarkify_caterpillarscr_unmarkify_caterpillarfunction scr_unmarkify_caterpillar()
{
for (i = 0; i < 2; i += 1)
{
if (i_ex(global.cinstance[i]))
{
if (global.char[i + 1] == 2)
{
if (global.cinstance[i].x != s.x || global.cinstance[i].y != s.x)
{
global.cinstance[i].x = s.x;
global.cinstance[i].y = s.y + 10;
with (global.cinstance[i])
scr_caterpillar_interpolate();
global.cinstance[i].y -= 10;
}
with (global.cinstance[i])
{
if (global.facing == 0)
sprite_index = dsprite;
if (global.facing == 1)
sprite_index = rsprite;
if (global.facing == 2)
sprite_index = usprite;
if (global.facing == 3)
sprite_index = lsprite;
visible = 1;
}
with (s)
instance_destroy();
}
if (global.char[i + 1] == 3)
{
if (global.cinstance[i].x != r.x || global.cinstance[i].y != r.x)
{
global.cinstance[i].x = r.x;
global.cinstance[i].y = r.y + 10;
with (global.cinstance[i])
scr_caterpillar_interpolate();
global.cinstance[i].y -= 10;
}
with (global.cinstance[i])
{
if (global.facing == 0)
sprite_index = dsprite;
if (global.facing == 1)
sprite_index = rsprite;
if (global.facing == 2)
sprite_index = usprite;
if (global.facing == 3)
sprite_index = lsprite;
visible = 1;
}
with (r)
instance_destroy();
}
}
}
} () |
2 |
{ |
3 |
for (i = 0; i < 2; i += 1) |
4 |
{ |
5 |
if (i_ex(global.cinstance[i])) |
6 |
{ |
7 |
if (global.char[i + 1] == 2) |
8 |
{ |
9 |
if (global.cinstance[i].x != s.x || global.cinstance[i].y != s.x) |
10 |
{ |
11 |
global.cinstance[i].x = s.x; |
12 |
global.cinstance[i].y = s.y + 10; |
13 |
with (global.cinstance[i]) |
14 |
scr_caterpillar_interpolatescr_caterpillar_interpolatefunction scr_caterpillar_interpolate()
{
_newfacing = scr_facing_letter_to_number( scr_get_cardinal_direction(point_direction(x, y, obj_mainchara.x, obj_mainchara.y)));
remx[0] = obj_mainchara.x;
remy[0] = obj_mainchara.y;
facing[0] = _newfacing;
for (_iaia = target; _iaia > 0; _iaia -= 1)
{
remx[_iaia] = lerp(obj_mainchara.x, x, _iaia / target);
if (global.darkzone == 1)
remy[_iaia] = lerp(obj_mainchara.y, y + 16, _iaia / target);
else
remy[_iaia] = lerp(obj_mainchara.y, y + 6, _iaia / target);
facing[_iaia] = _newfacing;
}
} (); |
15 |
global.cinstance[i].y -= 10; |
16 |
} |
17 |
with (global.cinstance[i]) |
18 |
{ |
19 |
if (global.facing == 0) |
20 |
sprite_index = dsprite; |
21 |
if (global.facing == 1) |
22 |
sprite_index = rsprite; |
23 |
if (global.facing == 2) |
24 |
sprite_index = usprite; |
25 |
if (global.facing == 3) |
26 |
sprite_index = lsprite; |
27 |
visible = 1; |
28 |
} |
29 |
with (s) |
30 |
instance_destroy(); |
31 |
} |
32 |
if (global.char[i + 1] == 3) |
33 |
{ |
34 |
if (global.cinstance[i].x != r.x || global.cinstance[i].y != r.x) |
35 |
{ |
36 |
global.cinstance[i].x = r.x; |
37 |
global.cinstance[i].y = r.y + 10; |
38 |
with (global.cinstance[i]) |
39 |
scr_caterpillar_interpolatescr_caterpillar_interpolatefunction scr_caterpillar_interpolate()
{
_newfacing = scr_facing_letter_to_number( scr_get_cardinal_direction(point_direction(x, y, obj_mainchara.x, obj_mainchara.y)));
remx[0] = obj_mainchara.x;
remy[0] = obj_mainchara.y;
facing[0] = _newfacing;
for (_iaia = target; _iaia > 0; _iaia -= 1)
{
remx[_iaia] = lerp(obj_mainchara.x, x, _iaia / target);
if (global.darkzone == 1)
remy[_iaia] = lerp(obj_mainchara.y, y + 16, _iaia / target);
else
remy[_iaia] = lerp(obj_mainchara.y, y + 6, _iaia / target);
facing[_iaia] = _newfacing;
}
} (); |
40 |
global.cinstance[i].y -= 10; |
41 |
} |
42 |
with (global.cinstance[i]) |
43 |
{ |
44 |
if (global.facing == 0) |
45 |
sprite_index = dsprite; |
46 |
if (global.facing == 1) |
47 |
sprite_index = rsprite; |
48 |
if (global.facing == 2) |
49 |
sprite_index = usprite; |
50 |
if (global.facing == 3) |
51 |
sprite_index = lsprite; |
52 |
visible = 1; |
53 |
} |
54 |
with (r) |
55 |
instance_destroy(); |
56 |
} |
57 |
} |
58 |
} |
59 |
} |