Deltarune (Chapter 4) script viewer

← back to main script listing

gml_Object_obj_sprhighlight_Step_2

(view raw script w/o annotations or w/e)
1
if (!instance_exists(target))
2
{
3
    if (init && auto_cleanup)
4
        instance_destroy();
5
    exit;
6
}
7
else if (!init)
8
{
9
    if (target.sprite_width == 0 || target.sprite_height == 0)
10
        exit;
11
    init = true;
12
    width = max(abs(target.sprite_width), 1);
13
    height = max(abs(target.sprite_height), 1);
14
}
15
if (match_depth)
16
    depth = target.depth + depth_offset;