Deltarune (Chapter 2) script viewer

← back to main script listing

gml_Object_obj_shakeobj_Step_0

(view raw script w/o annotations or w/e)
1
if (active == 0)
2
    instance_destroy();
3
if (active == 1)
4
{
5
    if (i_ex(target))
6
    {
7
        shakeamt -= shakereduct;
8
        on *= -1;
9
        target.x = nowx + (shakeamt * on);
10
        if (shakeamt <= 0)
11
            instance_destroy();
12
    }
13
    else
14
    {
15
        instance_destroy();
16
    }
17
}