Deltarune (Chapter 3) script viewer

← back to main script listing

gml_Object_obj_board_swordswitch_Step_0

(view raw script w/o annotations or w/e)
1
active = true;
2
if (active)
3
{
4
    if (con == 0)
5
    {
6
        if (i_ex(obj_board_swordhitbox))
7
        {
8
            if (place_meeting(x, y, obj_board_swordhitbox))
9
            {
10
                snd_play(snd_board_sword_metal);
11
                switchstate = !switchstate;
12
                con = 1;
13
            }
14
        }
15
    }
16
    if (con == 1)
17
    {
18
        if (!i_ex(obj_board_swordhitbox))
19
            con = 0;
20
    }
21
}
22
image_index = switchstate;