Deltarune (Chapter 3) script viewer

← back to main script listing

gml_Object_obj_b1pushpyramid_Step_0

(view raw script w/o annotations or w/e)
1
if (susie == 0)
2
{
3
    with (obj_mainchara_board)
4
    {
5
        if (name == "susie")
6
            other.susie = id;
7
    }
8
}
9
if (ralsei == 0)
10
{
11
    with (obj_mainchara_board)
12
    {
13
        if (name == "ralsei")
14
            other.ralsei = id;
15
    }
16
}
17
if (pyramid == 0)
18
{
19
    with (obj_pushableblock_board)
20
    {
21
        if (extflag == "rockSecretBlockTrig")
22
            other.pyramid = id;
23
    }
24
}
25
var mytrigger = "rocksecret";
26
if (active == 1)
27
{
28
    if (abandoncon == 1)
29
    {
30
        abandoncon++;
31
        with (obj_actor_tenna)
32
            bounce = 1;
33
        var tetalk = stringsetloc(
You didn't want to see it. That's cool.
"You didn't want to see it. That's cool.", "obj_b1pushpyramid_slash_Step_0_gml_20_0"
);
34
        
scr_couchtalk
scr_couchtalk

function scr_couchclear(arg0) { with (obj_couchwriter) { if (speaker == arg0) instance_destroy(); } } function
scr_couchtalk(arg0, arg1)
{ var ix = -1; var iy = -1; if (argument_count >= 6) { ix = argument4; iy = argument5; } var couchtext = instance_create_depth(ix, iy, 5000, obj_couchwriter); couchtext.mystring = arg0; couchtext.speaker = arg1; if (argument_count >= 3) couchtext.cleartext = argument2; if (argument_count >= 4) couchtext.drawtime = argument3; if (argument_count >= 7) couchtext.customsnd = argument6; if (argument_count >= 8) couchtext.customcolor = argument7; if (argument_count >= 9) couchtext.talkrate = argument8; if (argument_count >= 10) couchtext.talklength = argument9; return couchtext; }
(tetalk, "tenna", 2, 61);
35
    }
36
    if (abandoncon == 2)
37
    {
38
        abandontimer++;
39
        if (abandontimer == 60)
40
        {
41
            with (obj_actor_tenna)
42
                bounce = 1;
43
            var tetalk = stringsetloc(
That's fine. Okay. Yeah.
"That's fine. Okay. Yeah.", "obj_b1pushpyramid_slash_Step_0_gml_29_0"
);
44
            
scr_couchtalk
scr_couchtalk

function scr_couchclear(arg0) { with (obj_couchwriter) { if (speaker == arg0) instance_destroy(); } } function
scr_couchtalk(arg0, arg1)
{ var ix = -1; var iy = -1; if (argument_count >= 6) { ix = argument4; iy = argument5; } var couchtext = instance_create_depth(ix, iy, 5000, obj_couchwriter); couchtext.mystring = arg0; couchtext.speaker = arg1; if (argument_count >= 3) couchtext.cleartext = argument2; if (argument_count >= 4) couchtext.drawtime = argument3; if (argument_count >= 7) couchtext.customsnd = argument6; if (argument_count >= 8) couchtext.customcolor = argument7; if (argument_count >= 9) couchtext.talkrate = argument8; if (argument_count >= 10) couchtext.talklength = argument9; return couchtext; }
(tetalk, "tenna", 2, 61);
45
            abandontimer = 0;
46
            abandoncon++;
47
        }
48
    }
49
    if (abandoncon == 3)
50
    {
51
        abandontimer++;
52
        if (abandontimer == 60)
53
        {
54
            with (obj_actor_tenna)
55
                bounce = 1;
56
            var tetalk = stringsetloc(
You'll just never be able to see it again.
"You'll just never be able to see it again.", "obj_b1pushpyramid_slash_Step_0_gml_41_0"
);
57
            
scr_couchtalk
scr_couchtalk

function scr_couchclear(arg0) { with (obj_couchwriter) { if (speaker == arg0) instance_destroy(); } } function
scr_couchtalk(arg0, arg1)
{ var ix = -1; var iy = -1; if (argument_count >= 6) { ix = argument4; iy = argument5; } var couchtext = instance_create_depth(ix, iy, 5000, obj_couchwriter); couchtext.mystring = arg0; couchtext.speaker = arg1; if (argument_count >= 3) couchtext.cleartext = argument2; if (argument_count >= 4) couchtext.drawtime = argument3; if (argument_count >= 7) couchtext.customsnd = argument6; if (argument_count >= 8) couchtext.customcolor = argument7; if (argument_count >= 9) couchtext.talkrate = argument8; if (argument_count >= 10) couchtext.talklength = argument9; return couchtext; }
(tetalk, "tenna", 2, 61);
58
            abandontimer = 0;
59
            abandoncon++;
60
        }
61
    }
62
    if (susiewalkcon == 0 && obj_board_camera.con == 0)
63
    {
64
        susietime++;
65
        if (susietime == 1)
66
            ralsei.follow = true;
67
        if (susietime >= 10)
68
        {
69
            if (!i_ex(obj_quizchaser) && !i_ex(obj_chaseenemy_board))
70
            {
71
                susiewalkcon = 1;
72
                susietime = 0;
73
            }
74
        }
75
    }
76
    if (susiewalkcon == 1)
77
    {
78
        with (obj_mainchara_board)
79
        {
80
            if (name == "susie")
81
                sleepy = true;
82
        }
83
        var weedcount = 0;
84
        with (obj_board_grabbablegrass)
85
        {
86
            if (active)
87
                weedcount++;
88
        }
89
        if (global.flag[1020 got_power_croissant] == 0)
90
            weedcount = 0;
91
        if (weedcount != 0)
92
        {
93
            susiewalkcon = 10;
94
        }
95
        else
96
        {
97
            susiewalkcon = 2;
98
            
scr_pathfind_to_point
scr_pathfind_to_point

function
scr_pathfind_to_point(arg0, arg1, arg2)
{ var __destx = arg1 + 16; var __desty = arg2 + 16; if (arg1 < 12 && arg2 < 8) { __destx = 128 + (32 * arg1) + 16; __desty = 64 + (32 * arg2) + 16; } with (obj_mainchara_board) { if (name == arg0) { path_end(); is_moving_timer = 0; is_moving = true; path_target_x = __destx; path_target_y = __desty; follow = false; if (argument_count == 4) { if (argument3 != -1) path_end_facing = argument3; } if (argument_count == 5) { if (argument4 != -1) allow_diagonals = argument4; } } } }
("susie", 5.5, 4, 0);
99
            suwalktimer = 0;
100
        }
101
    }
102
    if (susiewalkcon == 2)
103
    {
104
        if (
scr_board_checklocation
scr_board_checklocation

function
scr_board_checklocation()
{ var _name = argument0; var _xloc = argument1; var _yloc = argument2; if (_xloc < 12) _xloc = board_tilex(_xloc); if (_yloc < 12) _yloc = board_tiley(_yloc); var _tol = 4; if (argument_count == 4) _tol = argument3; var targ = 0; with (obj_mainchara_board) { if (name == _name) targ = id; } if (!i_ex(targ)) { debug_message("target does not exist"); return false; } if (abs(targ.x - _xloc) < _tol && abs(targ.y - _yloc) < _tol) return true; }
("susie", board_tilex(5.5), board_tiley(4), 2))
105
            suwalktimer++;
106
        if (suwalktimer == 2)
107
            
scr_play_recording
scr_play_recording

function
scr_play_recording(arg0, arg1)
{ with (obj_mainchara_board) { if (name == arg0) { susierecordcon = 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(targ))
113
        {
114
            if (point_in_rectangle(targ.x, targ.y, board_tilex(0), board_tiley(0), board_tilex(11), board_tiley(7)))
115
            {
116
                
scr_pathfind_to_point
scr_pathfind_to_point

function
scr_pathfind_to_point(arg0, arg1, arg2)
{ var __destx = arg1 + 16; var __desty = arg2 + 16; if (arg1 < 12 && arg2 < 8) { __destx = 128 + (32 * arg1) + 16; __desty = 64 + (32 * arg2) + 16; } with (obj_mainchara_board) { if (name == arg0) { path_end(); is_moving_timer = 0; is_moving = true; path_target_x = __destx; path_target_y = __desty; follow = false; if (argument_count == 4) { if (argument3 != -1) path_end_facing = argument3; } if (argument_count == 5) { if (argument4 != -1) allow_diagonals = argument4; } } } }
("susie", targ.x, targ.y, 2);
117
            }
118
            else
119
            {
120
                
scr_pathfind_end
scr_pathfind_end

function
scr_pathfind_end(arg0)
{ with (obj_mainchara_board) { if (name == arg0) { path_end(); path_target_x = -1; path_target_y = -1; is_moving_timer = 0; is_moving = false; } } }
("susie");
121
                targ = -4;
122
                debug_print("no target");
123
                susiewalkcon = 99;
124
                susie.sleepy = true;
125
                
scr_play_susie_recording
scr_play_susie_recording

function
scr_play_susie_recording(arg0)
{ with (obj_mainchara_board) { if (name == "susie") { susierecordcon = 2; susierecordcount = 0; susierecordstring = arg0; susierecordsave = false; } } }
("0W");
126
            }
127
        }
128
        susietime = 0;
129
        susiewalkcon = 11;
130
    }
131
    if (susiewalkcon == 11)
132
    {
133
        if (i_ex(targ))
134
        {
135
            if (
scr_board_checklocation
scr_board_checklocation

function
scr_board_checklocation()
{ var _name = argument0; var _xloc = argument1; var _yloc = argument2; if (_xloc < 12) _xloc = board_tilex(_xloc); if (_yloc < 12) _yloc = board_tiley(_yloc); var _tol = 4; if (argument_count == 4) _tol = argument3; var targ = 0; with (obj_mainchara_board) { if (name == _name) targ = id; } if (!i_ex(targ)) { debug_message("target does not exist"); return false; } if (abs(targ.x - _xloc) < _tol && abs(targ.y - _yloc) < _tol) return true; }
("susie", targ.x, targ.y, 2))
136
            {
137
                
scr_pathfind_end
scr_pathfind_end

function
scr_pathfind_end(arg0)
{ with (obj_mainchara_board) { if (name == arg0) { path_end(); path_target_x = -1; path_target_y = -1; is_moving_timer = 0; is_moving = false; } } }
("susie");
138
                susietime = 0;
139
                susiewalkcon = 12;
140
            }
141
        }
142
    }
143
    if (susiewalkcon == 12)
144
    {
145
        susietime++;
146
        if (susietime == 5)
147
            
scr_play_susie_recording
scr_play_susie_recording

function
scr_play_susie_recording(arg0)
{ with (obj_mainchara_board) { if (name == "susie") { susierecordcon = 2; susierecordcount = 0; susierecordstring = arg0; susierecordsave = false; } } }
("0101");
148
        if (susietime == 45)
149
            susiewalkcon = 0;
150
    }
151
    if (con == 0)
152
    {
153
        with (pyramid)
154
        {
155
            if (waspushed != 0)
156
            {
157
                other.ptime++;
158
                if (other.ptime == 3)
159
                {
160
                    var replacement = instance_create(x, y, obj_board_solid);
161
                    other.pyramid = replacement;
162
                    replacement.sprite_index = sprite_index;
163
                    
scr_darksize
scr_darksize

function
scr_darksize()
{ var inst = id; if (argument_count) inst = argument0; inst.image_xscale = 2; inst.image_yscale = 2; }
(replacement);
164
                    replacement.depth = depth;
165
                    replacement.visible = true;
166
                    other.con++;
167
                    instance_destroy();
168
                }
169
            }
170
        }
171
    }
172
    if (con == 1)
173
    {
174
        snd_play_pitch(snd_link_secret, 1);
175
        snd_play(snd_board_door_close);
176
        puff = instance_create_board(10, 2, obj_board_smokepuff);
177
        puff.image_blend = #FFECBD;
178
        maildoor = instance_create_board(10, 2, obj_board_warptouch);
179
        maildoor.warpx = 2048;
180
        maildoor.warpy = 320;
181
        maildoor.playerX = 2224;
182
        maildoor.playerY = 528;
183
        maildoor.extflag = "mailroom";
184
        maildoor.sprite_index = spr_board_downstairs;
185
        maildoor.visible = true;
186
        maildoor.image_alpha = 1;
187
        maildoor.depth = 999990;
188
        
scr_darksize
scr_darksize

function
scr_darksize()
{ var inst = id; if (argument_count) inst = argument0; inst.image_xscale = 2; inst.image_yscale = 2; }
(maildoor);
189
        global.flag[1115 mailroom_status] = 1;
190
        with (obj_actor_tenna)
191
            bounce = 1;
192
        var tetalk = stringsetloc(
Incredible!!! You've discovered the SECRET MAILROOM!!!
"Incredible!!! You've discovered the SECRET MAILROOM!!!", "obj_b1pushpyramid_slash_Step_0_gml_196_0"
);
193
        
scr_couchtalk
scr_couchtalk

function scr_couchclear(arg0) { with (obj_couchwriter) { if (speaker == arg0) instance_destroy(); } } function
scr_couchtalk(arg0, arg1)
{ var ix = -1; var iy = -1; if (argument_count >= 6) { ix = argument4; iy = argument5; } var couchtext = instance_create_depth(ix, iy, 5000, obj_couchwriter); couchtext.mystring = arg0; couchtext.speaker = arg1; if (argument_count >= 3) couchtext.cleartext = argument2; if (argument_count >= 4) couchtext.drawtime = argument3; if (argument_count >= 7) couchtext.customsnd = argument6; if (argument_count >= 8) couchtext.customcolor = argument7; if (argument_count >= 9) couchtext.talkrate = argument8; if (argument_count >= 10) couchtext.talklength = argument9; return couchtext; }
(tetalk, "tenna", 2, 160);
194
        con = 2;
195
    }
196
}
197
else
198
{
199
    susiewalkcon = 0;
200
    susietime = 0;
201
    susiewalkcon = 0;
202
    if (abandoncon > 0)
203
        abandoncon = -1;
204
}