Deltarune (Chapter 3) script viewer

← back to main script listing

gml_Object_obj_pc3_room1_Step_0

(view raw script w/o annotations or w/e)
1
with (block)
2
{
3
    reset--;
4
    if (reset == 0)
5
    {
6
        debug_print("global.interact=0 set by reset tile");
7
        global.interact = 0;
8
    }
9
}
10
if (con == 0)
11
{
12
    if (resettile.pt == 1)
13
    {
14
        resettile.pt = 2;
15
        with (block)
16
        {
17
            var doreset = true;
18
            with (obj_board_grabobject)
19
            {
20
                if (grabbedid == other.id)
21
                    doreset = false;
22
            }
23
            if (doreset == true)
24
            {
25
                var __tileLayer = layer_get_id("BOARD_Tiles");
26
                var __originX = layer_get_x(__tileLayer);
27
                var __originY = layer_get_y(__tileLayer);
28
                global.interact = 1;
29
                
scr_lerpvar
scr_lerpvar

function
scr_lerpvar()
{ if (argument_count < 6) ___lerpvar =
scr_lerpvar_instance(id, argument[0], argument[1], argument[2], argument[3]);
else ___lerpvar =
scr_lerpvar_instance(id, argument[0], argument[1], argument[2], argument[3], argument[4], argument[5]);
return ___lerpvar; } function scr_lerpvar_respect() { if (argument_count < 6) ___lerpvar =
scr_lerpvar_instance(id, argument[0], argument[1], argument[2], argument[3]);
else ___lerpvar =
scr_lerpvar_instance(id, argument[0], argument[1], argument[2], argument[3], argument[4], argument[5]);
___lerpvar.respectglobalinteract = true; return ___lerpvar; }
("x", x, xstart + __originX, 10, 1, "in");
30
                
scr_lerpvar
scr_lerpvar

function
scr_lerpvar()
{ if (argument_count < 6) ___lerpvar =
scr_lerpvar_instance(id, argument[0], argument[1], argument[2], argument[3]);
else ___lerpvar =
scr_lerpvar_instance(id, argument[0], argument[1], argument[2], argument[3], argument[4], argument[5]);
return ___lerpvar; } function scr_lerpvar_respect() { if (argument_count < 6) ___lerpvar =
scr_lerpvar_instance(id, argument[0], argument[1], argument[2], argument[3]);
else ___lerpvar =
scr_lerpvar_instance(id, argument[0], argument[1], argument[2], argument[3], argument[4], argument[5]);
___lerpvar.respectglobalinteract = true; return ___lerpvar; }
("y", y, ystart + __originY, 10, 1, "out");
31
                reset = 10;
32
            }
33
        }
34
    }
35
    var count = 0;
36
    with (trig1)
37
    {
38
        if (place_meeting(x, y, obj_pushableblock_board))
39
            count++;
40
    }
41
    if (count == 1 && resettile.pressed == false)
42
    {
43
        safe_delete(trig1);
44
        timer = -10;
45
        snd_play(snd_board_secret_normal);
46
        global.interact = 1;
47
        con = 1;
48
    }
49
}
50
if (con == 1)
51
{
52
    var timedelay = 6;
53
    timer++;
54
    if (timer == (timedelay * 1))
55
    {
56
        with (tree1)
57
        {
58
            snd_play(snd_board_splash);
59
            instance_create_depth(x, y, depth - 1, obj_board_smokepuff);
60
            instance_destroy();
61
        }
62
    }
63
    if (timer == (timedelay * 2))
64
    {
65
        with (tree2)
66
        {
67
            snd_play(snd_board_splash);
68
            instance_create_depth(x, y, depth - 1, obj_board_smokepuff);
69
            instance_destroy();
70
        }
71
    }
72
    if (timer == (timedelay * 3))
73
    {
74
        with (block)
75
        {
76
            snd_play(snd_board_splash);
77
            instance_create_depth(x, y, depth - 1, obj_board_smokepuff);
78
            instance_destroy();
79
        }
80
    }
81
    if (timer == (timedelay * 4))
82
    {
83
        with (resettile)
84
        {
85
            snd_play(snd_board_splash);
86
            instance_create_depth(x, y, depth - 1, obj_board_smokepuff);
87
            instance_destroy();
88
        }
89
        global.interact = 0;
90
        with (obj_board_nothrow)
91
        {
92
            if (image_blend == #FF9999)
93
                instance_destroy();
94
        }
95
        with (obj_board_solidenemy)
96
        {
97
            if (image_blend == #FFFF75)
98
                instance_destroy();
99
        }
100
        global.flag[1150 parent_lock_3] = 2;
101
        timer = 0;
102
        con++;
103
    }
104
}