Undertale script viewer

← back to main script listing

gml_Object_obj_mkid_actor_Step_2

(view raw script w/o annotations or w/e)
1
if (closemove == 1)
2
{
3
    x += (obj_mainchara.x - xfer);
4
    y += (obj_mainchara.y - yfer);
5
    if (room == room_water_waterfall)
6
    {
7
        if (y < 100)
8
            y = 100;
9
        if (x < 1500)
10
        {
11
            if (y > 150)
12
                y -= 3;
13
        }
14
    }
15
    if (room == room_water_waterfall2)
16
    {
17
        if (y > 915)
18
            y -= 3;
19
        if (y < 850)
20
        {
21
            if (x > 160)
22
                x -= 3;
23
        }
24
        else if (x > 166 && y < 857)
25
        {
26
            y = 857;
27
        }
28
        if (x < 120)
29
            x += 3;
30
        if (y > obj_echoflower.y && global.flag[91 trash_save_mkid_pos] < 3)
31
        {
32
            global.flag[91 trash_save_mkid_pos] = 3;
33
            speed = 0;
34
            sprite_index = rtsprite;
35
            image_speed = 0;
36
            follow = 8;
37
            alarm[3] = 25;
38
        }
39
    }
40
    facing = global.facing;
41
    image_speed = obj_mainchara.image_speed;
42
    if (facing == 0)
43
        sprite_index = dsprite;
44
    if (facing == 1)
45
        sprite_index = rsprite;
46
    if (facing == 2)
47
        sprite_index = usprite;
48
    if (facing == 3)
49
        sprite_index = lsprite;
50
    closemove = 0;
51
}