Deltarune (Chapter 5) script viewer

← back to main script listing

gml_Object_obj_climb_climbablefox_Create_0

(view raw script w/o annotations or w/e)
1
event_inherited();
2
scr_depth
scr_depth

function
scr_depth(arg0 = id, arg1 = 0)
{ with (arg0) depth = 100000 - ((y * 10) + (sprite_height * 10) + (arg1 * 10)); }
(self, -1.5 * y);
3
con = 0;
4
overlap_timer = 0;
5
overlap_timer2 = 0;
6
climbable = instance_create(x, y, obj_climb_climbable);
7
8
climbable.on_climbing = function()
9
{
10
    if (con == 0)
11
        con = 1;
12
    overlap_timer = 10;
13
    overlap_timer2++;
14
};
15
16
image_xscale = choose(-2, 2);
17
x += 20;
18
y += 20;
19
20
jump_off = function()
21
{
22
    depth = 50000;
23
    with (instance_create(x - 40, y - 40, obj_animation))
24
    {
25
        sprite_index = spr_poof;
26
        image_xscale = 1;
27
        image_yscale = 1;
28
        image_speed = 0.5;
29
        depth = other.depth - 1;
30
    }
31
    hspeed = 5 * image_xscale;
32
    gravity = 1;
33
    vspeed = -3;
34
    snd_play(snd_wing);
35
};