Deltarune (Chapter 4) script viewer

← back to main script listing

gml_Object_obj_light_following_Step_2

(view raw script w/o annotations or w/e)
1
if (i_ex(target))
2
{
3
    if (followtype == 1)
4
        setxy(target.x + xoff, target.y + yoff);
5
    if (followtype == 2)
6
    {
7
        x = lerp(x, target.x + xoff, lerpstrength);
8
        y = lerp(y, target.y + yoff, lerpstrength);
9
    }
10
}