Deltarune (Chapter 2) script viewer

← back to main script listing

gml_Object_obj_crusher_leeway_Draw_0

(view raw script w/o annotations or w/e)
1
draw_sprite(sprite_index, image_index, x - 5, y - 5);
2
if (parent != -1 && i_ex(parent))
3
{
4
    x = parent.x - 35;
5
    y = parent.y - 4;
6
}
7
else
8
{
9
    instance_destroy();
10
}
11
for (var i = 0; i < instance_number(obj_yheart_shot); i += 1)
12
{
13
    enemy[i] = instance_find(obj_yheart_shot, i);
14
    if (enemy[i].x >= (x + 5) && distance_to_object(enemy[i]) < 40)
15
    {
16
        enemy[i].y = y;
17
        instance_destroy();
18
    }
19
}