Deltarune (Chapter 2) script viewer

← back to main script listing

gml_Object_obj_pushtile_room_Step_0

(view raw script w/o annotations or w/e)
1
if (pushedoverride < 0)
2
{
3
    pushed = 0;
4
    for (var i = 0; i < 3; i++)
5
    {
6
        if (place_meeting(x, y, pushChar[i]))
7
            pushed = 1;
8
    }
9
}
10
else
11
{
12
    pushed = pushedoverride;
13
}
14
var pushchanged = -1;
15
if (pushed != rempushed)
16
    pushchanged = pushed;
17
if (pushchanged == 0)
18
    variable_instance_set(instance_find(bossObject, 0), pushVariableName, pushVariableUp);
19
if (pushchanged == 1)
20
{
21
    snd_play(pushSound);
22
    variable_instance_set(instance_find(bossObject, 0), pushVariableName, pushVariableDown);
23
}
24
if (pushType == 1)
25
{
26
    if (pushed == 1)
27
        pushedoverride = 1;
28
}
29
image_index = pushed;
30
rempushed = pushed;