Deltarune (Chapter 2) script viewer

← back to main script listing

gml_Object_obj_thrash_wheel_bullet_Step_0

(view raw script w/o annotations or w/e)
1
if (bounce == 1)
2
{
3
    var _boxbottom = (obj_growtangle.y + (obj_growtangle.sprite_height / 2)) - 8;
4
    if (vspeed > 0 && (y + vspeed + 10) >= _boxbottom && x <= ((obj_growtangle.x + (obj_growtangle.sprite_width / 2)) - 8))
5
    {
6
        y = _boxbottom - 10;
7
        last_hspeed = hspeed;
8
        last_vspeed = vspeed;
9
        speed = 0;
10
        initialgravity = gravity;
11
        gravity = 0;
12
        bounce = -2;
13
        image_index = 1;
14
    }
15
}
16
else if (bounce < 0)
17
{
18
    bounce++;
19
    if (bounce == 0)
20
    {
21
        hspeed = last_hspeed;
22
        vspeed = -last_vspeed / 2;
23
        gravity = initialgravity;
24
        image_index = 0;
25
    }
26
}