Deltarune (Chapter 3) script viewer

← back to main script listing

gml_Object_obj_board_resettile_Step_0

(view raw script w/o annotations or w/e)
1
var _controlledPlayer = 0;
2
with (obj_mainchara_board)
3
{
4
    if (controlled == true)
5
        _controlledPlayer = id;
6
}
7
resetcounttimer--;
8
if (pressed == 0)
9
{
10
    if (i_ex(instance_place(x, y, _controlledPlayer)))
11
    {
12
        pressed = true;
13
        snd_stop(snd_bell);
14
        snd_play(snd_bell);
15
        pt = 1;
16
        if (resetcounttimer <= 0)
17
        {
18
            resetcount++;
19
            resetcounttimer = 150;
20
        }
21
        reset = true;
22
        with (obj_board_event_bridgepuzzle)
23
        {
24
            if (puzzleid == other.puzzleid)
25
            {
26
                reset = true;
27
                resetcount = other.resetcount;
28
                other.reset = false;
29
            }
30
        }
31
        if (room == room_dw_b3bs_mysterypuzzle)
32
        {
33
            with (obj_dw_b3bs_mysterypuzzle)
34
                resettile = true;
35
        }
36
    }
37
}
38
if (pressed == 1)
39
{
40
    if (!i_ex(instance_place(x, y, _controlledPlayer)))
41
    {
42
        pressed = false;
43
        pt = 0;
44
    }
45
}
46
image_index = pressed;