Deltarune (Chapter 5) script viewer

← back to main script listing

gml_Object_obj_climb_bouldergenerator_Step_0

(view raw script w/o annotations or w/e)
1
var cx = camerax();
2
var cy = cameray();
3
var active = false;
4
var check = "peaches";
5
if (other.trig != "none")
6
    check = other.trig;
7
active = true;
8
if (active)
9
{
10
    timer++;
11
    if (timer == threshhold)
12
    {
13
        timer = 0;
14
        var _trig = true;
15
        if (_trig)
16
        {
17
            with (instance_create(x, y, obj_climb_boulder))
18
            {
19
                trig = other.trig;
20
                if (other.badrate != -1)
21
                {
22
                    bad = true;
23
                    with (other)
24
                    {
25
                        made--;
26
                        if (made <= 0)
27
                        {
28
                            made = badrate;
29
                            other.bad = false;
30
                        }
31
                    }
32
                }
33
                
34
                newWait = function()
35
                {
36
                    return irandom_range(waitmin, waitmax);
37
                };
38
                
39
                bouncerange = other.bouncerange;
40
                bouncemin = other.bouncemin;
41
                waitmin = other.waitmin;
42
                waitmax = other.waitmax;
43
            }
44
        }
45
    }
46
}