Undertale script viewer

← back to main script listing

gml_Object_obj_donutbullet_Alarm_0

(view raw script w/o annotations or w/e)
1
if (instance_exists(obj_purpleheart))
2
{
3
    op = obj_purpleheart;
4
    if (op.type == 0)
5
        y = op.yzero + ((choice - 1) * op.yspace);
6
    if (side == 0)
7
    {
8
        x = op.xmid - (op.xlen * 2);
9
        hspeed = speedfactor;
10
    }
11
    if (side == 1)
12
    {
13
        x = op.xmid + (op.xlen * 2);
14
        hspeed = -speedfactor;
15
    }
16
    if (choice == 1)
17
        vspeed = abs(hspeed) / 2;
18
    if (choice == 3)
19
        vspeed = -abs(hspeed) / 2;
20
}
21
else
22
{
23
    instance_destroy();
24
}
25
visible = true;