Undertale script viewer

← back to main script listing

gml_Object_obj_menubone_bottom_Step_0

(view raw script w/o annotations or w/e)
1
if (active == 1)
2
{
3
    if (con == 1)
4
    {
5
        x = idealx;
6
        y = 480;
7
        vspeed = -10;
8
        con = 2;
9
    }
10
    if (con == 2)
11
    {
12
        if (y <= idealy)
13
        {
14
            vspeed = 0;
15
            hspeed = myspeed;
16
            con = 3;
17
        }
18
    }
19
    if (con == 3)
20
    {
21
        cool = 0;
22
        if (hspeed < 0)
23
        {
24
            if (x <= idealx2)
25
                cool = 1;
26
        }
27
        if (hspeed > 0)
28
        {
29
            if (x >= idealx2)
30
                cool = 1;
31
        }
32
        if (cool == 1)
33
        {
34
            hspeed = 0;
35
            vspeed = 10;
36
            con = 4;
37
        }
38
    }
39
    if (con == 4)
40
    {
41
        if (y >= 480)
42
        {
43
            speed = 0;
44
            con = 1;
45
            if (terminate == 1)
46
                instance_destroy();
47
        }
48
    }
49
}