|
1
|
event_inherited();
|
|
2
|
scr_platswap_initscr_platswap_init
function scr_platswap_init(arg0 = undefined, arg1 = true)
{
if (!instance_exists(obj_platswap))
return -4;
if (!instance_exists(obj_platswap_helper))
instance_create(0, 0, obj_platswap_helper);
var _helper = 658;
if (arg0 == undefined)
{
ignore_yorigin = 0;
if (!variable_instance_exists(id, "force_yplat"))
force_yplat = false;
with (_helper)
init_platswap(other.id, arg1);
return _helper;
}
if (instance_exists(arg0))
{
with (arg0)
{
if (!variable_instance_exists(id, "force_yplat"))
force_yplat = false;
ignore_yorigin = 0;
with (_helper)
init_platswap(arg0.id, arg1);
return _helper;
}
}
}
function scr_platswap_init_alt(arg0 = id, arg1 = true)
{
if (!instance_exists(obj_platswap))
return -4;
if (!instance_exists(obj_platswap_helper))
instance_create(0, 0, obj_platswap_helper);
if (instance_exists(arg0))
{
with (arg0)
{
ignore_yorigin = 1;
if (!variable_instance_exists(id, "force_yplat"))
force_yplat = false;
with (_helper)
init_platswap(other.id, arg1);
return _helper;
}
}
}
function scr_plat_make_pauseable(arg0 = id)
{
if (!instance_exists(obj_platswap))
return -4;
if (!instance_exists(obj_plat_pausing_helper))
instance_create(0, 0, obj_plat_pausing_helper);
with (obj_plat_pausing_helper)
add_object(arg0);
} ();
|
|
3
|
scr_depthscr_depth
function scr_depth(arg0 = id, arg1 = 0)
{
with (arg0)
depth = 100000 - ((y * 10) + (sprite_height * 10) + (arg1 * 10));
} ();
|
|
4
|
siner = 0;
|
|
5
|
siner = random(600);
|
|
6
|
blocktimer = 0;
|
|
7
|
image_speed = 0;
|
|
8
|
spec = 0;
|
|
9
|
remdepth = depth;
|
|
10
|
xstart += (0.5 * sprite_width);
|
|
11
|
ystart += (0.75 * sprite_height);
|
|
12
|
was_standing = false;
|
|
13
|
shrink_current = 0;
|
|
14
|
xscale_start = image_xscale;
|
|
15
|
yscale_start = image_yscale;
|
|
16
|
growsound = -4;
|
|
17
|
con = 0;
|
|
18
|
leaf_dir = 0;
|
|
19
|
can_shrink = image_xscale < 2 && image_yscale < 2;
|
|
20
|
platform = instance_create(x, y, obj_plat_floor);
|
|
21
|
platform.x = x + 10;
|
|
22
|
platform.image_xscale = 5;
|
|
23
|
platform.visible = false;
|
|
24
|
frontmarker1 = instance_create(x, y, obj_marker);
|
|
25
|
with (frontmarker1)
|
|
26
|
{
|
|
27
|
sprite_index = other.sprite_index;
|
|
28
|
image_index = 4;
|
|
29
|
image_xscale = other.image_xscale;
|
|
30
|
image_yscale = other.image_yscale;
|
|
31
|
image_speed = 0;
|
|
32
|
depth = other.depth - 1;
|
|
33
|
}
|
|
34
|
frontmarker2 = instance_create(x, y, obj_marker);
|
|
35
|
with (frontmarker2)
|
|
36
|
{
|
|
37
|
sprite_index = other.sprite_index;
|
|
38
|
image_index = 5;
|
|
39
|
image_xscale = other.image_xscale;
|
|
40
|
image_yscale = other.image_yscale;
|
|
41
|
image_speed = 0;
|
|
42
|
depth = other.depth - 2;
|
|
43
|
}
|
|
44
|
|
|
45
|
water = function(arg0)
|
|
46
|
{
|
|
47
|
if (!arg0)
|
|
48
|
shrink_current = 0;
|
|
49
|
if (!arg0 && image_xscale < 2)
|
|
50
|
{
|
|
51
|
if (growsound == -4)
|
|
52
|
growsound = snd_loop(snd_chain_wave);
|
|
53
|
x = lerp(xstart, xstart - (sprite_get_width(sprite_index) * 0.5), image_xscale);
|
|
54
|
y = lerp(ystart, ystart - (sprite_get_height(sprite_index) * 0.75), image_yscale);
|
|
55
|
image_xscale = scr_approachscr_approach
function scr_approach(arg0, arg1, arg2)
{
if (arg0 < arg1)
{
arg0 += arg2;
if (arg0 > arg1)
return arg1;
}
else
{
arg0 -= arg2;
if (arg0 < arg1)
return arg1;
}
return arg0;
} (image_xscale, 2, 0.01);
|
|
56
|
image_yscale = scr_approachscr_approach
function scr_approach(arg0, arg1, arg2)
{
if (arg0 < arg1)
{
arg0 += arg2;
if (arg0 > arg1)
return arg1;
}
else
{
arg0 -= arg2;
if (arg0 < arg1)
return arg1;
}
return arg0;
} (image_yscale, 2, 0.01);
|
|
57
|
snd_pitch(growsound, image_xscale / 2);
|
|
58
|
snd_volume(growsound, 1, 1);
|
|
59
|
}
|
|
60
|
};
|