|
1
|
if (init == 0)
|
|
2
|
{
|
|
3
|
init = 1;
|
|
4
|
upper_vine = instance_place(x, y - 40, object_index);
|
|
5
|
}
|
|
6
|
if (con == 0)
|
|
7
|
{
|
|
8
|
if (timer <= 0)
|
|
9
|
{
|
|
10
|
timer = 999;
|
|
11
|
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_index", image_index_start, image_index_start + 4, 10);
|
|
12
|
}
|
|
13
|
setxy(x, y, myclimb);
|
|
14
|
if (scicheck())
|
|
15
|
{
|
|
16
|
con = 1;
|
|
17
|
var dist = 0;
|
|
18
|
var vol = -1;
|
|
19
|
with (obj_climb_kris)
|
|
20
|
{
|
|
21
|
dist = distance_to_object_bbox(id, other);
|
|
22
|
vol = scr_progressscr_progress
function scr_progress(arg0, arg1, arg2, arg3, arg4)
{
return clamp(arg3 + (((arg0 - arg1) / (arg2 - arg1)) * (arg4 - arg3)), arg3, arg4);
}
function scr_xprog(arg0, arg1, arg2, arg3 = false)
{
var _progress = 0;
if ((arg2 - arg1) != 0)
{
if (arg3)
_progress = clamp((arg0 - arg1) / (arg2 - arg1), 0, 1);
else
_progress = (arg0 - arg1) / (arg2 - arg1);
return _progress;
}
} (dist, 250, 10, 0, 1);
|
|
23
|
}
|
|
24
|
if (vol > 0.1)
|
|
25
|
{
|
|
26
|
var snd = snd_play(snd_ghostappear, vol, random_range(1.8, 2.4));
|
|
27
|
snd_volume(snd, 0, 6);
|
|
28
|
snd_play(snd_noise, vol / 2, 1.2);
|
|
29
|
}
|
|
30
|
with (instance_create(x, y, obj_marker))
|
|
31
|
{
|
|
32
|
sprite_index = spr_dw_cliff_destructible_vines_cut;
|
|
33
|
scr_darksizescr_darksize
function scr_darksize()
{
var inst = id;
if (argument_count)
inst = argument0;
inst.image_xscale = 2;
inst.image_yscale = 2;
} ();
|
|
34
|
var sc = other.sprite_column;
|
|
35
|
if (sc > 6)
|
|
36
|
sc = 5;
|
|
37
|
image_index = 3 * sc;
|
|
38
|
image_speed = 0.25;
|
|
39
|
depth = other.depth - 1;
|
|
40
|
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, 10);
|
|
41
|
}
|
|
42
|
timer = waittime;
|
|
43
|
}
|
|
44
|
}
|
|
45
|
if (con == 1)
|
|
46
|
{
|
|
47
|
image_index = image_index_start;
|
|
48
|
setxy(x + (room_width * 4), y, myclimb);
|
|
49
|
var countdown = false;
|
|
50
|
if (!waittilscissorsgone)
|
|
51
|
countdown = true;
|
|
52
|
else if (!scicheck())
|
|
53
|
countdown = true;
|
|
54
|
if (countdown)
|
|
55
|
{
|
|
56
|
timer--;
|
|
57
|
if (timer <= 0)
|
|
58
|
{
|
|
59
|
var dist = 0;
|
|
60
|
var vol = -1;
|
|
61
|
with (obj_climb_kris)
|
|
62
|
{
|
|
63
|
dist = distance_to_object_bbox(id, other);
|
|
64
|
vol = scr_progressscr_progress
function scr_progress(arg0, arg1, arg2, arg3, arg4)
{
return clamp(arg3 + (((arg0 - arg1) / (arg2 - arg1)) * (arg4 - arg3)), arg3, arg4);
}
function scr_xprog(arg0, arg1, arg2, arg3 = false)
{
var _progress = 0;
if ((arg2 - arg1) != 0)
{
if (arg3)
_progress = clamp((arg0 - arg1) / (arg2 - arg1), 0, 1);
else
_progress = (arg0 - arg1) / (arg2 - arg1);
return _progress;
}
} (dist, 250, 10, 0, 1);
|
|
65
|
}
|
|
66
|
if ((vol / 3) > 0.05)
|
|
67
|
{
|
|
68
|
var snd = snd_play(snd_bigcut, vol / 3, 1.2);
|
|
69
|
snd_volume(snd, 0, 3);
|
|
70
|
}
|
|
71
|
con = 0;
|
|
72
|
}
|
|
73
|
}
|
|
74
|
}
|