Undertale script viewer

← back to main script listing

gml_Object_obj_mainchara_Step_2

related scripts: Collision_10 • Collision_11 • Collision_12 • Collision_13 • Collision_1367 • Collision_822 • Create_0 • Draw_0 • KeyPress_118 • KeyPress_120 • KeyPress_121 • KeyPress_122 • KeyPress_123 • KeyPress_33 • KeyPress_34 • KeyPress_35 • KeyPress_36 • KeyPress_45 • KeyPress_46 • KeyPress_48 • KeyPress_49 • KeyPress_50 • KeyPress_51 • KeyPress_52 • KeyPress_53 • KeyPress_54 • KeyPress_71 • KeyPress_73 • KeyPress_77 • KeyPress_79 • KeyPress_80 • KeyPress_85 • Keyboard_76 • Keyboard_83 • Other_10 • Other_12 • Step_0 • 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);