Deltarune (Chapter 3) script viewer

← back to main script listing

gml_Object_obj_board_b3s_stanchion_Step_0

(view raw script w/o annotations or w/e)
1
if (active)
2
{
3
    if (sndbuff > 0)
4
        sndbuff--;
5
    if (instance_exists(obj_board_swordhitbox))
6
    {
7
        if (place_meeting(x, y, obj_board_swordhitbox))
8
        {
9
            var sword = instance_place(x, y, obj_board_swordhitbox);
10
            if (sword.swordlv > 2)
11
            {
12
                instance_create(centerx(), centery(), obj_board_enemydefeatsplash);
13
                instance_destroy();
14
            }
15
            else if (sndbuff <= 0)
16
            {
17
                snd_stop(snd_board_sword_metal);
18
                snd_play(snd_board_sword_metal);
19
                sndbuff = 10;
20
            }
21
        }
22
    }
23
}