Deltarune (Chapter 3) script viewer

← back to main script listing

gml_Object_obj_sprhighlight_Step_2

(view raw script w/o annotations or w/e)
1
if (!i_ex(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
    sprite_surf = surface_create(width, height);
15
}
16
if (match_depth)
17
    depth = target.depth + depth_offset;