|
1
|
oo = 0;
|
|
2
|
if (spec < 2)
|
|
3
|
blocktimer += 1;
|
|
4
|
shrink_current++;
|
|
5
|
var scale = scr_platswap_yscalescr_platswap_yscale
function scr_platswap_yscale()
{
with (obj_platswap)
return __transition_yscale;
return [0, 1];
} ();
|
|
6
|
if (scale[0] == 1)
|
|
7
|
{
|
|
8
|
frontmarker1.depth = 1501;
|
|
9
|
frontmarker2.depth = 1500;
|
|
10
|
}
|
|
11
|
platform.y = y + 80;
|
|
12
|
if (growsound != -4)
|
|
13
|
{
|
|
14
|
if (can_shrink && image_xscale == xscale_start && image_yscale == yscale_start)
|
|
15
|
{
|
|
16
|
snd_volume(growsound, 0, 1);
|
|
17
|
}
|
|
18
|
else if (can_shrink && shrink_current > shrinkdelay)
|
|
19
|
{
|
|
20
|
x = lerp(xstart, xstart - (sprite_get_width(sprite_index) * 0.5), image_xscale);
|
|
21
|
y = lerp(ystart, ystart - (sprite_get_height(sprite_index) * 0.75), image_yscale);
|
|
22
|
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, xscale_start, 0.01);
|
|
23
|
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, yscale_start, 0.01);
|
|
24
|
snd_pitch(growsound, image_xscale / 2);
|
|
25
|
var target = 1198;
|
|
26
|
if (!i_ex(target))
|
|
27
|
target = 910;
|
|
28
|
if (!i_ex(target))
|
|
29
|
target = 1660;
|
|
30
|
if (i_ex(target))
|
|
31
|
snd_volume(growsound, 1 - inverselerp(0, 1000, point_distance(x, y, target.x, target.y)), 1);
|
|
32
|
}
|
|
33
|
else if (can_shrink && shrink_current >= 2)
|
|
34
|
{
|
|
35
|
snd_pitch(growsound, image_xscale / 2);
|
|
36
|
snd_volume(growsound, 0, 1);
|
|
37
|
}
|
|
38
|
}
|
|
39
|
if (scr_plat_standing_onscr_plat_standing_on
function scr_plat_standing_on(arg0, arg1)
{
if (is_string(arg0))
{
if (arg0 == "kr" || arg0 == "kris")
{
with (obj_plat_player)
return grounded && ground == arg1;
}
else
{
with (obj_plat_follower)
{
if ((arg0 == "su" || arg0 == "susie") && name == "susie")
return grounded && ground == arg1;
if ((arg0 == "ra" || arg0 == "ralsei") && name == "ralsei")
return grounded && ground == arg1;
}
}
}
else if (variable_instance_exists(arg0, "ground"))
{
return arg0.grounded && arg0.ground == arg1;
}
} ("kr", platform))
|
|
40
|
{
|
|
41
|
var ws = was_standing;
|
|
42
|
was_standing = true;
|
|
43
|
if (!ws)
|
|
44
|
{
|
|
45
|
for (var i = 0; i < 15; i++)
|
|
46
|
{
|
|
47
|
var xx = x + (sprite_width / 4) + random(sprite_width / 2);
|
|
48
|
var yy = y + (sprite_height / 2.5) + random(sprite_height / 8);
|
|
49
|
var mm = scr_dark_markerscr_dark_marker
function scr_dark_marker(arg0, arg1, arg2)
{
thismarker = instance_create(arg0, arg1, obj_marker);
with (thismarker)
{
sprite_index = arg2;
image_speed = 0;
image_xscale = 2;
image_yscale = 2;
}
return thismarker;
} (xx, yy, spr_blocktree_block_pink);
|
|
50
|
with (mm)
|
|
51
|
{
|
|
52
|
depth = other.depth - 1;
|
|
53
|
hspeed = (0.1 + random(0.2)) * (other.leaf_dir * -1);
|
|
54
|
vspeed = 2.7 + random(1.5);
|
|
55
|
gravity_direction = other.leaf_dir ? 225 : 315;
|
|
56
|
gravity = 0.1;
|
|
57
|
image_alpha = 0;
|
|
58
|
friction = -0.1;
|
|
59
|
scr_lerpvarscr_lerpvar
function scr_lerpvar()
{
var _id = self;
if (!is_struct(self))
_id = id;
if (argument_count < 6)
___lerpvar = scr_lerpvar_instance(_id, argument[0], argument[1], argument[2], argument[3]);
else
___lerpvar = scr_lerpvar_instance(_id, argument[0], argument[1], argument[2], argument[3], argument[4], argument[5]);
return ___lerpvar;
}
function scr_lerpcol()
{
if (argument_count < 6)
___lerpvar = scr_lerpcol_instance(id, argument[0], argument[1], argument[2], argument[3]);
else
___lerpvar = scr_lerpcol_instance(id, argument[0], argument[1], argument[2], argument[3], argument[4], argument[5]);
return ___lerpvar;
} ("image_alpha", 1, 0, 60);
|
|
60
|
scr_doomscr_doom
function scr_doom(arg0, arg1)
{
var _doom = instance_create_depth(0, 0, 0, obj_doom);
with (_doom)
{
alarm[0]
target = arg0;
}
return _doom;
} (self, 60);
|
|
61
|
scr_lerpvarscr_lerpvar
function scr_lerpvar()
{
var _id = self;
if (!is_struct(self))
_id = id;
if (argument_count < 6)
___lerpvar = scr_lerpvar_instance(_id, argument[0], argument[1], argument[2], argument[3]);
else
___lerpvar = scr_lerpvar_instance(_id, argument[0], argument[1], argument[2], argument[3], argument[4], argument[5]);
return ___lerpvar;
}
function scr_lerpcol()
{
if (argument_count < 6)
___lerpvar = scr_lerpcol_instance(id, argument[0], argument[1], argument[2], argument[3]);
else
___lerpvar = scr_lerpcol_instance(id, argument[0], argument[1], argument[2], argument[3], argument[4], argument[5]);
return ___lerpvar;
} ("vspeed", vspeed, 0, 60);
|
|
62
|
}
|
|
63
|
}
|
|
64
|
}
|
|
65
|
else if (abs(obj_plat_player.hspeed) > 1 && (blocktimer % 4) == 0)
|
|
66
|
{
|
|
67
|
var xx = x + (sprite_width / 4) + random(sprite_width / 2);
|
|
68
|
var yy = y + (sprite_height / 2.5) + random(sprite_height / 8);
|
|
69
|
siner += 10;
|
|
70
|
var mm = scr_dark_markerscr_dark_marker
function scr_dark_marker(arg0, arg1, arg2)
{
thismarker = instance_create(arg0, arg1, obj_marker);
with (thismarker)
{
sprite_index = arg2;
image_speed = 0;
image_xscale = 2;
image_yscale = 2;
}
return thismarker;
} (xx, yy, spr_blocktree_block_pink);
|
|
71
|
with (mm)
|
|
72
|
{
|
|
73
|
depth = other.depth - 1;
|
|
74
|
hspeed = (0.1 + random(0.2)) * (other.leaf_dir * -1);
|
|
75
|
vspeed = 2.7 + random(1.5);
|
|
76
|
gravity_direction = other.leaf_dir ? 225 : 315;
|
|
77
|
gravity = 0.1;
|
|
78
|
image_alpha = 0;
|
|
79
|
friction = -0.1;
|
|
80
|
scr_lerpvarscr_lerpvar
function scr_lerpvar()
{
var _id = self;
if (!is_struct(self))
_id = id;
if (argument_count < 6)
___lerpvar = scr_lerpvar_instance(_id, argument[0], argument[1], argument[2], argument[3]);
else
___lerpvar = scr_lerpvar_instance(_id, argument[0], argument[1], argument[2], argument[3], argument[4], argument[5]);
return ___lerpvar;
}
function scr_lerpcol()
{
if (argument_count < 6)
___lerpvar = scr_lerpcol_instance(id, argument[0], argument[1], argument[2], argument[3]);
else
___lerpvar = scr_lerpcol_instance(id, argument[0], argument[1], argument[2], argument[3], argument[4], argument[5]);
return ___lerpvar;
} ("image_alpha", 1, 0, 60);
|
|
81
|
scr_doomscr_doom
function scr_doom(arg0, arg1)
{
var _doom = instance_create_depth(0, 0, 0, obj_doom);
with (_doom)
{
alarm[0]
target = arg0;
}
return _doom;
} (self, 60);
|
|
82
|
scr_lerpvarscr_lerpvar
function scr_lerpvar()
{
var _id = self;
if (!is_struct(self))
_id = id;
if (argument_count < 6)
___lerpvar = scr_lerpvar_instance(_id, argument[0], argument[1], argument[2], argument[3]);
else
___lerpvar = scr_lerpvar_instance(_id, argument[0], argument[1], argument[2], argument[3], argument[4], argument[5]);
return ___lerpvar;
}
function scr_lerpcol()
{
if (argument_count < 6)
___lerpvar = scr_lerpcol_instance(id, argument[0], argument[1], argument[2], argument[3]);
else
___lerpvar = scr_lerpcol_instance(id, argument[0], argument[1], argument[2], argument[3], argument[4], argument[5]);
return ___lerpvar;
} ("vspeed", vspeed, 0, 60);
|
|
83
|
}
|
|
84
|
}
|
|
85
|
}
|
|
86
|
else
|
|
87
|
{
|
|
88
|
was_standing = false;
|
|
89
|
}
|
|
90
|
if (blocktimer == 20)
|
|
91
|
{
|
|
92
|
xv = x + (sprite_width / 4) + random(sprite_width / 2);
|
|
93
|
yv = y + (sprite_height / 4) + random(sprite_height / 4);
|
|
94
|
block = scr_dark_markerscr_dark_marker
function scr_dark_marker(arg0, arg1, arg2)
{
thismarker = instance_create(arg0, arg1, obj_marker);
with (thismarker)
{
sprite_index = arg2;
image_speed = 0;
image_xscale = 2;
image_yscale = 2;
}
return thismarker;
} (xv, yv, spr_blocktree_block_pink);
|
|
95
|
with (block)
|
|
96
|
{
|
|
97
|
hspeed = (0.4 + random(1)) * (other.leaf_dir * -1);
|
|
98
|
vspeed = 0.7 + random(1.5);
|
|
99
|
gravity_direction = other.leaf_dir ? 180 : 0;
|
|
100
|
gravity = 0.1;
|
|
101
|
image_alpha = 0;
|
|
102
|
friction = -0.1;
|
|
103
|
}
|
|
104
|
block.depth = depth - 1;
|
|
105
|
block.image_blend = merge_color(c_white, c_black, oo);
|
|
106
|
if (oo >= 0.8)
|
|
107
|
{
|
|
108
|
with (block)
|
|
109
|
instance_destroy();
|
|
110
|
}
|
|
111
|
}
|
|
112
|
if (blocktimer >= 20 && blocktimer <= 30)
|
|
113
|
{
|
|
114
|
with (block)
|
|
115
|
{
|
|
116
|
if (image_alpha < 1)
|
|
117
|
image_alpha += 0.2;
|
|
118
|
}
|
|
119
|
}
|
|
120
|
if (blocktimer >= 38)
|
|
121
|
{
|
|
122
|
with (block)
|
|
123
|
image_alpha -= 0.1;
|
|
124
|
}
|
|
125
|
if (blocktimer >= 48)
|
|
126
|
{
|
|
127
|
blocktimer = 0;
|
|
128
|
with (block)
|
|
129
|
instance_destroy();
|
|
130
|
}
|