Deltarune (Chapter 1) script viewer

← back to main script listing

gml_Object_obj_chaseenemy_Step_2

(view raw script w/o annotations or w/e)
1
if (alertcon >= 1 && frozen == 0 && ignoresolid == 0)
2
{
3
    if (collision_rectangle(bbox_left, bbox_top, bbox_right, bbox_bottom, obj_solidblock, false, true) || collision_rectangle(bbox_left, bbox_top, bbox_right, bbox_bottom, obj_solidenemy, false, true))
4
    {
5
        x -= hspeed;
6
        y -= vspeed;
7
        hspeed = 0;
8
        vspeed = 0;
9
    }
10
}