Deltarune (Chapter 3) script viewer

← back to main script listing

gml_Object_obj_shadowman_enemy_hat_Step_0

(view raw script w/o annotations or w/e)
1
if (con == 0)
2
{
3
    x = parentid.x;
4
    repeat (4)
5
    {
6
        if ((y - 4) < parentid.y)
7
        {
8
            y++;
9
        }
10
        else if (con == 0)
11
        {
12
            con = 1;
13
            
scr_shakeobj
scr_shakeobj

function
scr_shakeobj()
{ var _shakeobj = instance_create(x, y, obj_shakeobj); _shakeobj.target = id; if (argument_count >= 1) { if (i_ex(argument0)) _shakeobj.target = argument0; } if (argument_count >= 2) { if (argument1 != -1) _shakeobj.shakeamt = argument1; } if (argument_count >= 3) { if (argument2 != -1) _shakeobj.shakereduct = argument2; } with (_shakeobj) event_user(0); }
();
14
            snd_play(snd_equip);
15
            image_index = 1;
16
            with (parentid)
17
            {
18
                idlesprite = spr_shadowman_idle_b_nothat;
19
                sparedsprite = spr_shadowman_idle_b_nothat;
20
            }
21
        }
22
    }
23
}
24
if (con == 1)
25
{
26
    if ((y - 4) < parentid.y)
27
        y++;
28
    timer++;
29
    if (timer == 11)
30
    {
31
        instance_destroy();
32
        with (parentid)
33
        {
34
            idlesprite = spr_shadowman_idle_b;
35
            sparedsprite = spr_shadowman_spare;
36
        }
37
    }
38
}