Deltarune (Chapter 3) script viewer

← back to main script listing

gml_Object_obj_board_lancerswitch_Step_0

(view raw script w/o annotations or w/e)
1
if (place_meeting(x, y, obj_mainchara_board))
2
    pressed = 1;
3
else
4
    pressed = 0;
5
if (disabled == true)
6
    pressed = 2;
7
if (pressed == 1)
8
{
9
    if (pressinit == 0)
10
    {
11
        snd_play_pitch(snd_noise, 1.4);
12
        if (!aesthetic)
13
        {
14
            pot1 = instance_create_board(1, 5, obj_board_grabbleObject);
15
            pot2 = instance_create_board(1, 6, obj_board_grabbleObject);
16
            instance_create_board(1, 5, obj_board_smokepuff);
17
            instance_create_board(1, 6, obj_board_smokepuff);
18
        }
19
    }
20
    pressinit = 1;
21
}
22
else
23
{
24
    if (pressinit == 1)
25
    {
26
        snd_play_pitch(snd_noise, 1.1);
27
        if (!aesthetic)
28
        {
29
            if (i_ex(pot1))
30
            {
31
                instance_create(pot1.x, pot1.y, obj_board_smokepuff);
32
                with (pot1)
33
                    instance_destroy();
34
            }
35
            if (i_ex(pot2))
36
            {
37
                instance_create(pot2.x, pot2.y, obj_board_smokepuff);
38
                with (pot2)
39
                    instance_destroy();
40
            }
41
        }
42
    }
43
    pressinit = 0;
44
}