Deltarune (Chapter 5) script viewer

← back to main script listing

gml_Object_obj_climb_boulder_Create_0

(view raw script w/o annotations or w/e)
1
event_inherited();
2
image_blend = c_white;
3
depth = 10000;
4
image_speed = 0;
5
consistent = false;
6
waitmin = 40;
7
waitmax = 60;
8
bouncerange = 4;
9
bouncemin = -6;
10
damage = 30;
11
init = 0;
12
myhealth = 2;
13
hitbuff = 0;
14
scr_size
scr_size

function
scr_size(arg0 = image_xscale, arg1 = image_yscale, arg2 = id)
{ with (arg2) { image_xscale = arg0; image_yscale = arg1; } }
(2, 2);
15
con = 1;
16
timer = 0;
17
x = choose(2, -2) + xstart;
18
active = false;
19
activetoggle = false;
20
cury = y + irandom(50) + 10;
21
if (distance_activate)
22
    cury = ystart;
23
image_flipper = irandom(80);
24
destroyonhit = false;
25
gravity = 0.9 + random(0.1);
26
memvspeed = vspeed;
27
memgravity = gravity;
28
fadecon = 0;
29
30
moveX = function(arg0 = 0)
31
{
32
    var targx = irandom_range(8, 12) * 2;
33
    if (x > xstart)
34
        targx = -targx;
35
    wasx = x;
36
    xtarg = x + targx;
37
};
38
39
newWait = function()
40
{
41
    if (consistent || distance_activate)
42
        return (waitmin + waitmax) / 2;
43
    return irandom_range(waitmin, waitmax);
44
};
45
46
waittime = newWait();
47
moveX(waittime);
48
xwas = x;
49
xtarg = x;
50
caught = false;
51
caughtby = -4;