|
1
|
if (con == 0)
|
|
2
|
{
|
|
3
|
var endpoint = obj_mainchara.bbox_bottom;
|
|
4
|
with (obj_caterpillarchara)
|
|
5
|
{
|
|
6
|
if ((bbox_bottom - 4) > endpoint)
|
|
7
|
endpoint = bbox_bottom - 4;
|
|
8
|
}
|
|
9
|
if (endpoint < bbox_top)
|
|
10
|
{
|
|
11
|
con = -1;
|
|
12
|
with (instance_create(x, y, obj_solidblocksized))
|
|
13
|
scr_sizeexactscr_sizeexact
function scr_sizeexact(arg0, arg1, arg2 = id)
{
with (arg2)
{
if (!sprite_exists(sprite_index))
{
debug_message("Can't size, no sprite");
exit;
}
var _w = sprite_get_width(sprite_index);
var _h = sprite_get_width(sprite_index);
image_xscale = arg0 / _w;
image_yscale = arg1 / _h;
}
} (other.sprite_width, other.sprite_height);
|
|
14
|
scr_delay_var("con", 2, irandom_range(1, 8));
|
|
15
|
}
|
|
16
|
}
|
|
17
|
if (con == 2)
|
|
18
|
{
|
|
19
|
con = 3;
|
|
20
|
var endtime = irandom_range(30, 60);
|
|
21
|
gravity = 1;
|
|
22
|
snd_stop(snd_impact);
|
|
23
|
snd_play(snd_impact, 0.4, random_range(0.3, 0.8));
|
|
24
|
vspeed = choose(-1, -1, 0, 0, 0, 0, 0, 0, -2);
|
|
25
|
scr_lerp_imageblendscr_lerp_imageblend
function scr_lerp_imageblend()
{
var lerpblend = instance_create(x, y, obj_lerpimageblend);
lerpblend.target = argument0;
lerpblend.color1 = argument1;
lerpblend.color2 = argument2;
var ___time = argument3;
if (argument_count > 4)
{
var _style = argument4;
var _ease = argument5;
lerpblend.mylerp = scr_lerp_var_instance(lerpblend, "blendindex", 0, 1, ___time, _style, _ease);
}
else
{
lerpblend.mylerp = scr_lerp_var_instance(lerpblend, "blendindex", 0, 1, ___time);
}
with (lerpblend)
alarm_set(0, ___time + 1);
return lerpblend;
} (id, c_white, c_black, endtime);
|
|
26
|
scr_doomscr_doom
function scr_doom(arg0 = id, arg1)
{
with (instance_create_depth(0, 0, 0, obj_doom))
{
alarm[0]
target = arg0;
persistent = arg0.persistent;
}
} (id, endtime);
|
|
27
|
}
|