Deltarune (Chapter 3) script viewer

← back to main script listing

gml_Object_obj_dw_b3bs_camerareminder_Step_0

(view raw script w/o annotations or w/e)
1
active = i_ex(obj_mainchara_board);
2
if (global.interact == 0 && !frozen)
3
    bsin++;
4
if (con == 0)
5
{
6
    with (bell1)
7
        y = 
scr_even
scr_even

function
scr_even(arg0)
{ return round(arg0 / 2) * 2; }
(128 + (sin((other.bsin + 32) / 6) * 32 * 2));
8
    b1[0].y = bell1.y;
9
    b1[1].y = bell1.y;
10
    with (bell2)
11
        y = 
scr_even
scr_even

function
scr_even(arg0)
{ return round(arg0 / 2) * 2; }
(128 + (sin(other.bsin / 8) * 32 * 2));
12
    b2[0].y = bell2.y;
13
    b2[1].y = bell2.y;
14
    with (bell3)
15
        y = 
scr_even
scr_even

function
scr_even(arg0)
{ return round(arg0 / 2) * 2; }
(128 + (sin(other.bsin / 15) * 32 * 2));
16
    b3[0].y = bell3.y;
17
    b3[1].y = bell3.y;
18
    with (bell4)
19
        y = 
scr_even
scr_even

function
scr_even(arg0)
{ return round(arg0 / 2) * 2; }
(128 + (sin(other.bsin / 12) * 32 * 2));
20
    b4[0].y = bell4.y;
21
    b4[1].y = bell4.y;
22
    with (obj_board_trigger)
23
    {
24
        if (!place_meeting(x, y, obj_board_grayregion))
25
        {
26
            if (place_meeting(x, y, obj_mainchara_board))
27
            {
28
                other.con = 1;
29
                other.timer = 0;
30
            }
31
        }
32
    }
33
    var trigd = 0;
34
    with (btrig)
35
    {
36
        if (place_meeting(x, y, obj_pushableblock_board))
37
            trigd = 1;
38
    }
39
    if (trigd == 1)
40
    {
41
        timer = 0;
42
        con = 3;
43
        global.flag[1142 cam_remind_solve] = 1;
44
        debug_print(string(instance_number(obj_pushableblock_board)));
45
        if (instance_number(obj_pushableblock_board) > 1)
46
            global.flag[1142 cam_remind_solve] = 2;
47
    }
48
}
49
if (con == 1)
50
{
51
    frozen = true;
52
    global.interact = 1;
53
    timer++;
54
    if (timer == 1)
55
    {
56
        snd_play(snd_bell);
57
        snd_play_delay(snd_bell, 4);
58
        with (obj_board_playercamera)
59
            instance_destroy();
60
        with (obj_board_grayregion)
61
            instance_destroy();
62
        with (obj_board_grabobject)
63
            instance_destroy();
64
        with (block)
65
        {
66
            if (x != 160 || y != 128)
67
            {
68
                setxy(160, 128);
69
                visible = true;
70
                instance_create_depth(x, y, depth - 1, obj_board_smokepuff);
71
            }
72
        }
73
        with (obj_mainchara_board)
74
        {
75
            grabbed = 0;
76
            grab = 0;
77
            if (name == "ralsei")
78
                unstoole = true;
79
        }
80
    }
81
    if (timer == 15)
82
    {
83
        with (obj_mainchara_board)
84
        {
85
            
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, 448, 14, -1, "out");
86
            
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, 128, 14, -1, "in");
87
        }
88
    }
89
    if (timer == 30)
90
    {
91
        timer = 0;
92
        con = 0;
93
        global.interact = 0;
94
        frozen = false;
95
        with (obj_mainchara_board)
96
            canfreemove = true;
97
    }
98
}
99
if (con == 3)
100
{
101
    var cont = 1;
102
    with (obj_pushableblock_board)
103
    {
104
        if (con != 0)
105
            cont = 0;
106
    }
107
    if (cont == 1)
108
    {
109
        global.interact = 1;
110
        snd_play(snd_link_secret);
111
        con = 4;
112
        timer = 0;
113
    }
114
}
115
if (con == 4)
116
{
117
    timer++;
118
    if (timer == 5)
119
    {
120
        with (bell1)
121
        {
122
            snd_play(snd_board_splash);
123
            instance_create(x, y, obj_board_smokepuff);
124
            instance_destroy();
125
        }
126
    }
127
    if (timer == 10)
128
    {
129
        with (bell2)
130
        {
131
            snd_play(snd_board_splash);
132
            instance_create(x, y, obj_board_smokepuff);
133
            instance_destroy();
134
        }
135
    }
136
    if (timer == 15)
137
    {
138
        with (bell3)
139
        {
140
            snd_play(snd_board_splash);
141
            instance_create(x, y, obj_board_smokepuff);
142
            instance_destroy();
143
        }
144
    }
145
    if (timer == 20)
146
    {
147
        with (bell4)
148
        {
149
            snd_play(snd_board_splash);
150
            instance_create(x, y, obj_board_smokepuff);
151
            instance_destroy();
152
        }
153
    }
154
    if (timer == 20)
155
    {
156
        with (block)
157
        {
158
            snd_play(snd_board_splash);
159
            instance_create(x, y, obj_board_smokepuff);
160
            instance_destroy();
161
        }
162
    }
163
    if (timer == 55)
164
    {
165
        
scr_shakescreen
scr_shakescreen

function
scr_shakescreen()
{ instance_create(x, y, obj_shake); }
();
166
        snd_play(snd_impact);
167
        var targcolor = 4858411;
168
        if (global.flag[1142 cam_remind_solve] == 2)
169
            targcolor = 2377478;
170
        with (obj_dw_ch3_b3bs_zapperhead)
171
            
scr_lerp_imageblend
scr_lerp_imageblend

function
scr_lerp_imageblend()
{ var lerpblend = instance_create(x, y, obj_lerpimageblend); lerpblend.target = argument0; lerpblend.color1 = argument1; lerpblend.color2 = argument2; var ___time = argument3; if (argument_count > 4) { var _style = argument4; var _ease = argument5; lerpblend.mylerp = scr_lerp_var_instance(lerpblend, "blendindex", 0, 1, ___time, _style, _ease); } else { lerpblend.mylerp = scr_lerp_var_instance(lerpblend, "blendindex", 0, 1, ___time); } with (lerpblend) alarm_set(0, ___time); return lerpblend; }
(id, c_black, targcolor, 60, 2, "in");
172
        makelight = true;
173
        timer = 0;
174
        con = 10;
175
        global.interact = 0;
176
    }
177
}
178
if (con == 10)
179
{
180
    if (i_ex(collision_rectangle(80, 340, 120, 380, obj_mainchara, 0, 0)))
181
    {
182
        global.interact = 1;
183
        snd_play(snd_b);
184
        con = 11;
185
        timer = 0;
186
    }
187
}
188
if (con == 11)
189
{
190
    headct[0] = 0;
191
    var headrange = 50;
192
    with (obj_dw_ch3_b3bs_zapperhead)
193
    {
194
        if (x > 248 && x < 554)
195
            array_push(other.headct, id);
196
    }
197
    array_delete(headct, 0, 1);
198
    show_debug_message(string(headct));
199
    head = headct[irandom_range(0, array_length(headct) - 1)];
200
    zapper = 
scr_dark_marker
scr_dark_marker

function
scr_dark_marker(arg0, arg1, arg2)
{ thismarker = instance_create(arg0, arg1, obj_marker); with (thismarker) { sprite_index = arg2; image_speed = 0; image_xscale = 2; image_yscale = 2; } return thismarker; }
(head.x + 64, head.y - 36, spr_zapper_jump_noshadow);
201
    with (zapper)
202
        
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; }
("image_index", 0, 4, 7);
203
    zapper.vspeed = -36;
204
    zapper.gravity = 2;
205
    zapper.image_xscale = -2;
206
    zapper.image_blend = c_black;
207
    
scr_lerp_imageblend
scr_lerp_imageblend

function
scr_lerp_imageblend()
{ var lerpblend = instance_create(x, y, obj_lerpimageblend); lerpblend.target = argument0; lerpblend.color1 = argument1; lerpblend.color2 = argument2; var ___time = argument3; if (argument_count > 4) { var _style = argument4; var _ease = argument5; lerpblend.mylerp = scr_lerp_var_instance(lerpblend, "blendindex", 0, 1, ___time, _style, _ease); } else { lerpblend.mylerp = scr_lerp_var_instance(lerpblend, "blendindex", 0, 1, ___time); } with (lerpblend) alarm_set(0, ___time); return lerpblend; }
(zapper, c_black, c_white, 8, 2, "out");
208
    snd_play(snd_jump);
209
    var desxloc = obj_mainchara.x - 48;
210
    desxloc = 336;
211
    zapper.image_xscale = 2;
212
    zapper.x -= 92;
213
    with (zapper)
214
        
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, desxloc, 30, 2, "out");
215
    safe_delete(head);
216
    con = 12;
217
}
218
var groundpos = 
scr_even
scr_even

function
scr_even(arg0)
{ return round(arg0 / 2) * 2; }
(obj_mainchara.y - 60);
219
if (con == 12)
220
{
221
    if (zapper.y < groundpos)
222
        con = 13;
223
}
224
if (con == 13)
225
{
226
    if (zapper.y >= groundpos)
227
    {
228
        zapper.y = groundpos;
229
        zapper.image_index = 7;
230
        with (zapper)
231
            scr_delay_var("image_index", 8, 4);
232
        zapper.gravity = 0;
233
        zapper.vspeed = 0;
234
        zapper.depth = obj_mainchara.depth;
235
        snd_play(snd_wing);
236
        con = 14;
237
        global.facing = 1;
238
        
scr_caterpillar_facing
scr_caterpillar_facing

function
scr_caterpillar_facing(arg0)
{ with (obj_caterpillarchara) { for (i = 0; i < 25; i += 1) facing[i] = arg0; } }
(global.facing);
239
    }
240
}
241
if (con == 14)
242
{
243
    global.msc = -99;
244
    global.choice = -1;
245
    global.choicemsg[0] = stringsetloc(
#Backstage#Entrance
"#Backstage#Entrance", "obj_dw_b3bs_camerareminder_slash_Step_0_gml_300_0"
);
246
    global.choicemsg[1] = stringsetloc(
#Stay Here
"#Stay Here", "obj_dw_b3bs_camerareminder_slash_Step_0_gml_301_0"
);
247
    global.choicemsg[2] = stringset("");
248
    global.choicemsg[3] = stringset("");
249
    
scr_speaker
scr_speaker

function
scr_speaker(arg0)
{ _speaker = arg0; global.typer = 5; if (global.darkzone == 1) global.typer = 6; if (global.fighting == 1) global.typer = 4; global.fc = 0; global.fe = 0; if (_speaker == "silent" && global.darkzone == 0) global.typer = 2; if (_speaker == "silent" && global.darkzone == 1) global.typer = 36; if (_speaker == "balloon" || _speaker == "enemy") global.typer = 50; if (_speaker == "sans") { global.typer = 14; global.fc = 6; } if (_speaker == "undyne" || _speaker == "und") { global.typer = 17; global.fc = 9; } if (_speaker == "temmie" || _speaker == "tem") global.typer = 21; if (_speaker == "jevil") global.typer = 35; if (_speaker == "catti") global.fc = 13; if (_speaker == "jockington" || _speaker == "joc") global.fc = 14; if (_speaker == "catty" || _speaker == "caddy") global.fc = 16; if (_speaker == "bratty" || _speaker == "bra") global.fc = 17; if (_speaker == "rouxls" || _speaker == "rou") global.fc = 18; if (_speaker == "burgerpants" || _speaker == "bur") global.fc = 19; if (_speaker == "spamton") { if (global.fighting == 0) global.typer = 66; else global.typer = 68; } if (_speaker == "sneo") global.typer = 67; if (_speaker == "tenna") { global.typer = 80; if (global.fighting == 1) global.typer = 81; } if (_speaker == "susie" || _speaker == "sus") { global.fc = 1; global.typer = 10; if (global.darkzone == 1) { global.typer = 30; if (global.fighting == 1) global.typer = 47; } } if (_speaker == "ralsei" || _speaker == "ral") { global.fc = 2; global.typer = 31; if (global.fighting == 1) global.typer = 45; if (global.flag[30 ralsei_hat_state] == 1) global.typer = 6; } if (_speaker == "noelle" || _speaker == "noe") { global.fc = 3; if (global.darkzone == 0) global.typer = 12; else global.typer = 56; if (global.fighting == 1) global.typer = 59; } if (_speaker == "toriel" || _speaker == "tor") { global.fc = 4; global.typer = 7; } if (_speaker == "asgore" || _speaker == "asg") { global.fc = 10; global.typer = 18; } if (_speaker == "king" || _speaker == "kin") { global.fc = 20; global.typer = 33; ...
("zapper");
250
    msgsetloc(0, 
* Hey!Delay 11 Youse guys ain't sposeda be here!Wait for input
"* Hey^1! Youse guys ain't sposeda be here!/", "obj_dw_b3bs_camerareminder_slash_Step_0_gml_305_0"
);
251
    msgnextloc(
* So,Delay 11 uh...Delay 11 where'd you wanna go instead?Wait for input
"* So^1, uh..^1. where'd you wanna go instead?/", "obj_dw_b3bs_camerareminder_slash_Step_0_gml_306_0"
);
252
    msgnext("\\C2 ");
253
    d_make();
254
    con = 15;
255
    blush = 0;
256
}
257
if (con == 15 && blush == 0)
258
{
259
    if (
scr_getmsgno
scr_getmsgno

function
scr_getmsgno()
{ if (instance_exists(obj_writer)) return obj_writer.msgno; }
() == 1)
260
    {
261
        with (zapper)
262
            setxy(x + 16, y + 6);
263
        zapper.sprite_index = spr_zapper_spare;
264
        image_speed = 0.125;
265
        blush = 1;
266
    }
267
}
268
if (con == 15 && global.choice != -1)
269
{
270
    k_d(1);
271
    blush = 0;
272
    with (zapper)
273
        setxy(x - 16, y - 6);
274
    zapper.sprite_index = spr_zapper_jump_noshadow;
275
    zapper.image_index = 8;
276
    zapper.image_speed = 0;
277
    
scr_speaker
scr_speaker

function
scr_speaker(arg0)
{ _speaker = arg0; global.typer = 5; if (global.darkzone == 1) global.typer = 6; if (global.fighting == 1) global.typer = 4; global.fc = 0; global.fe = 0; if (_speaker == "silent" && global.darkzone == 0) global.typer = 2; if (_speaker == "silent" && global.darkzone == 1) global.typer = 36; if (_speaker == "balloon" || _speaker == "enemy") global.typer = 50; if (_speaker == "sans") { global.typer = 14; global.fc = 6; } if (_speaker == "undyne" || _speaker == "und") { global.typer = 17; global.fc = 9; } if (_speaker == "temmie" || _speaker == "tem") global.typer = 21; if (_speaker == "jevil") global.typer = 35; if (_speaker == "catti") global.fc = 13; if (_speaker == "jockington" || _speaker == "joc") global.fc = 14; if (_speaker == "catty" || _speaker == "caddy") global.fc = 16; if (_speaker == "bratty" || _speaker == "bra") global.fc = 17; if (_speaker == "rouxls" || _speaker == "rou") global.fc = 18; if (_speaker == "burgerpants" || _speaker == "bur") global.fc = 19; if (_speaker == "spamton") { if (global.fighting == 0) global.typer = 66; else global.typer = 68; } if (_speaker == "sneo") global.typer = 67; if (_speaker == "tenna") { global.typer = 80; if (global.fighting == 1) global.typer = 81; } if (_speaker == "susie" || _speaker == "sus") { global.fc = 1; global.typer = 10; if (global.darkzone == 1) { global.typer = 30; if (global.fighting == 1) global.typer = 47; } } if (_speaker == "ralsei" || _speaker == "ral") { global.fc = 2; global.typer = 31; if (global.fighting == 1) global.typer = 45; if (global.flag[30 ralsei_hat_state] == 1) global.typer = 6; } if (_speaker == "noelle" || _speaker == "noe") { global.fc = 3; if (global.darkzone == 0) global.typer = 12; else global.typer = 56; if (global.fighting == 1) global.typer = 59; } if (_speaker == "toriel" || _speaker == "tor") { global.fc = 4; global.typer = 7; } if (_speaker == "asgore" || _speaker == "asg") { global.fc = 10; global.typer = 18; } if (_speaker == "king" || _speaker == "kin") { global.fc = 20; global.typer = 33; ...
("zapper");
278
    msgsetloc(0, 
* You got it,Delay 11 boss.Wait for inputClose Message
"* You got it^1, boss./%", "obj_dw_b3bs_camerareminder_slash_Step_0_gml_333_0"
);
279
    if (global.choice == 0)
280
        con = 99;
281
    if (global.choice == 1)
282
    {
283
        con = 16;
284
        timer = 0;
285
    }
286
    d_make();
287
}
288
if (con == 16 && !d_ex())
289
{
290
    timer++;
291
    if (timer == 1)
292
    {
293
        with (zapper)
294
        {
295
            sprite_index = spr_zapper_jump_noshadow;
296
            
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; }
("image_index", 0, 4, 8, 2, "out");
297
        }
298
    }
299
    if (timer > 1)
300
    {
301
        if (zapper.image_index >= 3 && zapper.gravity == 0)
302
        {
303
            with (zapper)
304
            {
305
                depth = 20;
306
                snd_play(snd_jump);
307
                vspeed = -12;
308
                hspeed = 4;
309
                gravity = 1;
310
            }
311
        }
312
        if (zapper.y > 276)
313
        {
314
            timer = 0;
315
            con = -1;
316
            
scr_lerp_imageblend
scr_lerp_imageblend

function
scr_lerp_imageblend()
{ var lerpblend = instance_create(x, y, obj_lerpimageblend); lerpblend.target = argument0; lerpblend.color1 = argument1; lerpblend.color2 = argument2; var ___time = argument3; if (argument_count > 4) { var _style = argument4; var _ease = argument5; lerpblend.mylerp = scr_lerp_var_instance(lerpblend, "blendindex", 0, 1, ___time, _style, _ease); } else { lerpblend.mylerp = scr_lerp_var_instance(lerpblend, "blendindex", 0, 1, ___time); } with (lerpblend) alarm_set(0, ___time); return lerpblend; }
(zapper, c_white, c_black, 12, 2, "out");
317
            
scr_doom
scr_doom

function
scr_doom(arg0, arg1)
{ with (instance_create_depth(0, 0, 0, obj_doom)) { alarm[0] target = arg0; } }
(zapper, 30);
318
            scr_delay_var("con", 17, 8);
319
            with (obj_dw__backstagelight)
320
                
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; }
("image_alpha", image_alpha, 0, 30, 2, "out");
321
        }
322
    }
323
}
324
if (con == 17)
325
{
326
    global.facing = 0;
327
    with (obj_caterpillarchara)
328
        
scr_caterpillar_interpolate
scr_caterpillar_interpolate

function
scr_caterpillar_interpolate()
{ _newfacing =
scr_facing_letter_to_number(
scr_get_cardinal_direction(point_direction(x, y, obj_mainchara.x, obj_mainchara.y)));
remx[0] = obj_mainchara.x; remy[0] = obj_mainchara.y; facing[0] = _newfacing; for (_iaia = target; _iaia > 0; _iaia -= 1) { remx[_iaia] = lerp(obj_mainchara.x, x, _iaia / target); if (global.darkzone == 1) remy[_iaia] = lerp(obj_mainchara.y, y + 16, _iaia / target); else remy[_iaia] = lerp(obj_mainchara.y, y + 6, _iaia / target); facing[_iaia] = _newfacing; } }
();
329
    global.interact = 0;
330
    con++;
331
}
332
if (con == 99 && !d_ex())
333
{
334
    change = instance_create(x, y, obj_tvturnoff_manager);
335
    change.kind = 1;
336
    change.roomtarg = 177;
337
    con++;
338
}
339
if (makelight)
340
{
341
    makelight = false;
342
    light = instance_create(44, 412, obj_dw__backstagelight);
343
    with (light)
344
    {
345
        if (global.flag[1142 cam_remind_solve] == 2)
346
            image_blend = #13D26F;
347
        type = 1;
348
        movetype = 4;
349
        range = 4;
350
        xrange = 6;
351
        amplitude = 30;
352
        drawlamp = false;
353
    }
354
}