Deltarune (Chapter 4) script viewer

← back to main script listing

gml_GlobalScript_scr_precise_hit

(view raw script w/o annotations or w/e)
1
function 
scr_precise_hit
scr_precise_hit

function
scr_precise_hit(arg0 = 3, arg1 = false)
{ arg0 /= 2; var _hx = obj_heart.x + 10; var _hy = obj_heart.y + 10; if (arg0 <= 0) return collision_point(_hx, _hy, id, true, false); else if (arg1) return collision_circle(_hx, _hy, arg0, id, true, false); else return collision_rectangle(_hx - arg0, _hy - arg0, _hx + arg0, _hy + arg0, id, true, false); }
(arg0 = 3, arg1 = false)
2
{
3
    arg0 /= 2;
4
    var _hx = obj_heart.x + 10;
5
    var _hy = obj_heart.y + 10;
6
    if (arg0 <= 0)
7
        return collision_point(_hx, _hy, id, true, false);
8
    else if (arg1)
9
        return collision_circle(_hx, _hy, arg0, id, true, false);
10
    else
11
        return collision_rectangle(_hx - arg0, _hy - arg0, _hx + arg0, _hy + arg0, id, true, false);
12
}