Deltarune (Chapter 4) script viewer

← back to main script listing

gml_Object_obj_bullet_almond_Other_10

(view raw script w/o annotations or w/e)
1
with (obj_bullet_almond)
2
{
3
    if (id != other.id)
4
    {
5
        if (other.x < x)
6
        {
7
            if (point_distance(other.x, other.y, x, y) < 40)
8
            {
9
                instance_destroy(other.id);
10
                break;
11
            }
12
        }
13
        else
14
        {
15
            var pointdir = point_direction(x, y, other.x, other.y);
16
            other.x += lengthdir_x(40, pointdir);
17
            other.y += lengthdir_y(40, pointdir);
18
            break;
19
        }
20
    }
21
}
22
if (i_ex(id))
23
{
24
    with (obj_bullet_almond)
25
    {
26
        if (id != other.id && point_distance(other.x, other.y, x, y) < 40)
27
        {
28
            instance_destroy(other.id);
29
            break;
30
        }
31
    }
32
}
33
if (abs(y - obj_growtangle.y) > 90)
34
    instance_destroy();