Undertale script viewer

← back to main script listing

gml_Object_blt_bluesword_Step_2

(view raw script w/o annotations or w/e)
1
if (global.turntimer < 1)
2
{
3
    global.turntimer = -1;
4
    global.mnfight = 3;
5
    instance_destroy();
6
}
7
if (instance_exists(obj_heart))
8
{
9
    if (abs(obj_heart.x - x) < 12)
10
    {
11
        g = 1;
12
        friction = 0.1;
13
        hspeed = -2;
14
    }
15
    else if (g == 1)
16
    {
17
        friction = -0.3;
18
    }
19
    if ((obj_heart.y - y) > (sprite_height / 2))
20
        y += 4;
21
    else if ((obj_heart.y - y) < (sprite_height / 4))
22
        y -= 4;
23
}