Undertale script viewer

← back to main script listing

gml_Object_obj_mettaton_flightdress_Step_2

(view raw script w/o annotations or w/e)
1
siner += 1;
2
y += (sin(siner / 10) / 2);
3
if (instance_exists(obj_multitileevent))
4
{
5
    if (middle == 1)
6
    {
7
        xx = view_xview[0];
8
        if (xx < 0)
9
            xx = 0;
10
        if (x < (xx + 60))
11
        {
12
            x += 3;
13
            if (instance_exists(obj_songwriter))
14
                obj_songwriter.x += 3;
15
        }
16
        if (x > (xx + 80))
17
        {
18
            x -= 3;
19
            if (instance_exists(obj_songwriter))
20
                obj_songwriter.x -= 3;
21
        }
22
    }
23
    if (middle == 2)
24
    {
25
        if (xx < 0)
26
            xx = 0;
27
        if (x < (xx + 150))
28
            x += 3;
29
        if (x > (xx + 170))
30
            x -= 3;
31
    }
32
}