Undertale script viewer

← back to main script listing

gml_Object_obj_mainchara_Step_2

(view raw script w/o annotations or w/e)
1
if (obj_time.left == 0)
2
{
3
    if (obj_time.right == 0)
4
    {
5
        if (obj_time.down == 0)
6
        {
7
            if (obj_time.up == 0)
8
                moving = 0;
9
        }
10
    }
11
}
12
if (global.interact > 0)
13
{
14
    moving = 0;
15
    movement = 0;
16
}
17
else
18
{
19
    movement = 1;
20
}
21
if (abs(xprevious - x) > 0.01 || abs(yprevious - y) > 0.01)
22
    moving = 1;
23
if (moving == 0)
24
{
25
    image_speed = 0;
26
    image_index = 0;
27
}
28
if (global.interact == 0)
29
{
30
    if (moving == 1)
31
        global.encounter += 1;
32
}
33
if (cutscene == 0)
34
{
35
    if (instance_exists(obj_shaker) == 0)
36
    {
37
        view_xview[0] = round((x - (view_wview[0] / 2)) + 10);
38
        view_yview[0] = round((y - (view_hview[0] / 2)) + 10);
39
    }
40
}
41
with (obj_backgrounder_parent)
42
    event_user(0);