Deltarune (Chapter 3) script viewer

← back to main script listing

gml_Object_obj_board_pickup_Step_0

(view raw script w/o annotations or w/e)
1
if (init == 0)
2
{
3
    if (type == "key")
4
        sprite_index = spr_board_key;
5
    if (type == "deodorant")
6
    {
7
        sprite_index = spr_board_deodorant;
8
        image_alpha = 1;
9
        con = 2;
10
    }
11
    if (type == "ribbon")
12
    {
13
        sprite_index = spr_board_bow_full;
14
        image_alpha = 1;
15
        con = 2;
16
    }
17
    if (type == "lancer")
18
    {
19
        sprite_index = spr_board_lancer_spin;
20
        image_speed = 0;
21
        image_index = 0;
22
        image_alpha = 1;
23
        con = 2;
24
    }
25
    if (type == "q")
26
    {
27
        glow = true;
28
        sprite_index = spr_board_inventory_q;
29
        if (room == room_board_2)
30
            sprite_index = spr_board_b2tennaglasses;
31
        if (room == room_board_3)
32
            sprite_index = spr_board_inventory_q;
33
        image_index = 0;
34
        image_speed = 0;
35
        image_alpha = 1;
36
        con = 2;
37
    }
38
    if (type == "rouxlsblock")
39
    {
40
        sprite_index = spr_board_rouxlsblock;
41
        image_alpha = 1;
42
        con = 3;
43
    }
44
    if (type == "camera")
45
    {
46
        if (room == room_dw_puzzlecloset_3)
47
        {
48
            if (global.flag[1150 parent_lock_3] >= 4)
49
            {
50
                global.flag[1244 parent_got_camera] = 1;
51
                with (obj_b3bs_console)
52
                    nocamera = false;
53
                instance_destroy();
54
            }
55
        }
56
        sprite_index = spr_board_playercamera_pickup;
57
        image_index = 0;
58
        image_speed = 0;
59
        image_alpha = 0;
60
        con = 2;
61
    }
62
    if (type == "sunmoonstone")
63
    {
64
        sprite_index = spr_board_sunmoonstone;
65
        image_alpha = 1;
66
        con = 2;
67
    }
68
    if (type == "power")
69
    {
70
        sprite_index = spr_board_powerpickup;
71
        image_alpha = 1;
72
        con = 2;
73
    }
74
    if (type == "sword")
75
    {
76
        sprite_index = spr_board_sword;
77
        image_alpha = 1;
78
        playerspin = false;
79
        con = 2;
80
    }
81
    if (type == "voucher")
82
    {
83
        sprite_index = spr_board_voucher;
84
        image_alpha = 1;
85
        con = 2;
86
    }
87
    if (type == "bonus")
88
    {
89
        sprite_index = spr_board_b2bonus;
90
        image_alpha = 1;
91
        con = 2;
92
    }
93
    if (type == "idcard")
94
    {
95
        sprite_index = spr_board_keycard;
96
        image_alpha = 1;
97
        xoff = 8;
98
        yoff = 14;
99
        con = 2;
100
    }
101
    if (override != -1)
102
        con = override;
103
    init = 1;
104
}
105
if (kris == 0)
106
{
107
    with (obj_mainchara_board)
108
    {
109
        if (name == "kris")
110
            other.kris = id;
111
    }
112
}
113
if (ralsei == 0)
114
{
115
    with (obj_mainchara_board)
116
    {
117
        if (name == "ralsei")
118
            other.ralsei = id;
119
    }
120
}
121
if (susie == 0)
122
{
123
    with (obj_mainchara_board)
124
    {
125
        if (name == "susie")
126
            other.susie = id;
127
    }
128
}
129
if (player == 0)
130
{
131
    with (obj_mainchara_board)
132
    {
133
        if (controlled == 1)
134
            other.player = id;
135
    }
136
}
137
if (con == 0)
138
{
139
    
scr_depth_board
scr_depth_board

function
scr_depth_board()
{ depth = 1000000 - ((y * 10) + ((sprite_height - sprite_yoffset) * 10)); } function scr_board_depth() {
scr_depth_board();
}
();
140
    image_alpha = 0;
141
    timer++;
142
    if (timer >= 4)
143
    {
144
        image_alpha = 1;
145
        con = 1;
146
    }
147
}
148
if (con == 1)
149
{
150
    
scr_depth_board
scr_depth_board

function
scr_depth_board()
{ depth = 1000000 - ((y * 10) + ((sprite_height - sprite_yoffset) * 10)); } function scr_board_depth() {
scr_depth_board();
}
();
151
    image_speed = 0.5;
152
    if (image_index == (sprite_get_number(sprite_index) - 1))
153
    {
154
        con = 2;
155
        image_speed = 0;
156
    }
157
}
158
if (con >= 2)
159
    image_speed = 0;
160
if (con == 2 && obj_board_camera.shift == "none")
161
{
162
    image_alpha = 1;
163
    
scr_depth_board
scr_depth_board

function
scr_depth_board()
{ depth = 1000000 - ((y * 10) + ((sprite_height - sprite_yoffset) * 10)); } function scr_board_depth() {
scr_depth_board();
}
();
164
    if (type != "q")
165
        image_index = sprite_get_number(sprite_index) - 1;
166
    if (type == "lancer")
167
        image_index = 0;
168
    if (type == "q")
169
    {
170
        if (obj_board_inventory.qcount == 1)
171
            image_index = 1;
172
    }
173
    var checkpos = true;
174
    player = 0;
175
    with (obj_mainchara_board)
176
    {
177
        if (controlled == 1)
178
            other.player = id;
179
    }
180
    var _kris = 0;
181
    with (obj_mainchara_board)
182
    {
183
        if (name == "kris")
184
            _kris = id;
185
    }
186
    var _susie = 0;
187
    with (obj_mainchara_board)
188
    {
189
        if (name == "susie")
190
            _susie = id;
191
    }
192
    var _ralsei = 0;
193
    with (obj_mainchara_board)
194
    {
195
        if (name == "ralsei")
196
            _ralsei = id;
197
    }
198
    var _elnina = 0;
199
    with (obj_mainchara_board)
200
    {
201
        if (name == "elnina")
202
            _elnina = id;
203
    }
204
    var _lancer = 0;
205
    with (obj_mainchara_board)
206
    {
207
        if (name == "lancer")
208
            _lancer = id;
209
    }
210
    if (checkpos)
211
    {
212
        if (type == "power")
213
        {
214
            if (place_meeting(x, y, other.susie))
215
                con = 30;
216
            if (place_meeting(x, y, player))
217
                con = 20;
218
        }
219
        else
220
        {
221
            if (i_ex(_kris))
222
            {
223
                if (_kris.myhealth > 0)
224
                {
225
                    if (place_meeting(x, y, _kris))
226
                    {
227
                        player = _kris;
228
                        con = 3;
229
                    }
230
                }
231
            }
232
            if (room != room_board_1)
233
            {
234
                if (i_ex(_ralsei))
235
                {
236
                    if (place_meeting(x, y, _ralsei))
237
                    {
238
                        if (type != "ribbon")
239
                        {
240
                            player = _ralsei;
241
                            con = 3;
242
                        }
243
                    }
244
                }
245
                if (i_ex(_susie))
246
                {
247
                    if (place_meeting(x, y, _susie))
248
                    {
249
                        player = _susie;
250
                        con = 3;
251
                    }
252
                }
253
                if (i_ex(_lancer))
254
                {
255
                    if (place_meeting(x, y, _lancer))
256
                    {
257
                        if (_lancer.controlled == 1)
258
                        {
259
                            player = _lancer;
260
                            con = 3;
261
                        }
262
                    }
263
                }
264
                if (i_ex(_elnina))
265
                {
266
                    if (place_meeting(x, y, _elnina))
267
                    {
268
                        if (_elnina.controlled == 1)
269
                        {
270
                            player = _elnina;
271
                            con = 3;
272
                        }
273
                    }
274
                }
275
            }
276
        }
277
    }
278
    if (dodeodorant)
279
    {
280
        dodeodorant = false;
281
        player = _ralsei;
282
        con = 3;
283
    }
284
}
285
var transitiontime = 12;
286
var spintime = 1;
287
var spindelay = 3;
288
if (con == 3)
289
{
290
    if (i_ex(player))
291
    {
292
        with (player)
293
        {
294
            if (variable_instance_exists(id, "name"))
295
                other.pickupname = name;
296
        }
297
        glow = false;
298
    }
299
    
scr_depth_board
scr_depth_board

function
scr_depth_board()
{ depth = 1000000 - ((y * 10) + ((sprite_height - sprite_yoffset) * 10)); } function scr_board_depth() {
scr_depth_board();
}
();
300
    global.interact = 1;
301
    if (i_ex(player))
302
    {
303
        if (type == "lancer")
304
            image_speed = 0.25;
305
        if (player.name == "elnina")
306
            playerspin = false;
307
        with (player)
308
        {
309
            fun = 1;
310
            sprite_index = dsprite;
311
            if (other.playerspin)
312
            {
313
                scr_delay_var("sprite_index", lsprite, spintime * 3);
314
                scr_delay_var("facing", 3, spintime * 3);
315
                scr_delay_var("sprite_index", usprite, spintime * 4);
316
                scr_delay_var("facing", 2, spintime * 4);
317
                scr_delay_var("sprite_index", rsprite, spintime * 5);
318
                scr_delay_var("facing", 1, spintime * 5);
319
                scr_delay_var("sprite_index", dsprite, spintime * 6);
320
                scr_delay_var("facing", 0, spintime * 6);
321
                scr_delay_var("sprite_index", lsprite, spintime * 7);
322
                scr_delay_var("facing", 3, spintime * 7);
323
                scr_delay_var("sprite_index", usprite, spintime * 8);
324
                scr_delay_var("facing", 2, spintime * 8);
325
                scr_delay_var("sprite_index", rsprite, spintime * 9);
326
                scr_delay_var("facing", 1, spintime * 9);
327
            }
328
            scr_delay_var("sprite_index", dsprite_item, spintime * 10);
329
            scr_delay_var("facing", 0, spintime * 10);
330
        }
331
        var yoff2 = 0;
332
        if (player.name == "elnina")
333
            yoff2 = -16;
334
        
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, player.x + xoff, transitiontime, 2, "in");
335
        
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, (player.y - 32 - 8) + yoff + yoff2, transitiontime, 2, "out");
336
    }
337
    timer = 0;
338
    con = 4;
339
}
340
if (con == 4)
341
{
342
    
scr_depth_board
scr_depth_board

function
scr_depth_board()
{ depth = 1000000 - ((y * 10) + ((sprite_height - sprite_yoffset) * 10)); } function scr_board_depth() {
scr_depth_board();
}
();
343
    timer++;
344
    if (timer == transitiontime)
345
    {
346
        if (type == "lancer")
347
        {
348
            image_speed = 0;
349
            image_index = 0;
350
        }
351
        if (type == "sword")
352
        {
353
            timer = 0;
354
            con = 72;
355
        }
356
        else
357
        {
358
            var skip = false;
359
            snd_play(snd_link_sfx_itemget);
360
            var substring = stringsetloc(
KEY x1
"\\cYKEY\\cW x1", "obj_board_pickup_slash_Step_0_gml_270_0"
);
361
            if (type == "sunmoonstone")
362
                substring = stringsetloc(
THE MOONCLOUD STONE!
"THE \\cYMOONCLOUD STONE\\cW!", "obj_board_pickup_slash_Step_0_gml_271_0"
);
363
            if (type == "rouxlsblock")
364
                substring = stringsetloc(
THE ROUXLS BLOCK!
"THE \\cYROUXLS BLOCK\\cW!", "obj_board_pickup_slash_Step_0_gml_272_0"
);
365
            if (type == "q")
366
                substring = stringsetloc(
Q x1
"\\cYQ\\cW x1", "obj_board_pickup_slash_Step_0_gml_273_0"
);
367
            if (type == "camera")
368
                skip = true;
369
            if (type == "lancer")
370
            {
371
                substring = stringsetloc(
LANCER!
"\\cYLANCER\\cW!", "obj_board_pickup_slash_Step_0_gml_277_0"
);
372
                if (obj_board_inventory.lancer > 0)
373
                    substring = stringsetloc(
ANOTHER LANCER!
"ANOTHER \\cYLANCER\\cW!", "obj_board_pickup_slash_Step_0_gml_278_0"
);
374
            }
375
            if (type == "voucher")
376
                substring = stringsetloc(
A VOUCHER FOR 1000 POINTS!
"A \\cYVOUCHER\\cW FOR \\cY1000 POINTS\\cW!", "obj_board_pickup_slash_Step_0_gml_280_0"
);
377
            if (type == "bonus")
378
                substring = stringsetloc(
A BUCKET OF POINTS!
"A \\cYBUCKET OF POINTS\\cW!", "obj_board_pickup_slash_Step_0_gml_281_0"
);
379
            if (type == "idcard")
380
                substring = stringsetloc(
THE MOONCLOUD KEY CARD!
"THE \\cYMOONCLOUD KEY CARD\\cW!", "obj_board_pickup_slash_Step_0_gml_290_0"
);
381
            if (type == "deodorant" || type == "ribbon")
382
                skip = true;
383
            var yougot = stringsetsubloc("YOU GOT ~1/%", substring, "obj_board_pickup_slash_Step_0_gml_285_0");
384
            msgset(0, yougot);
385
            if (!skip)
386
            {
387
                safe_delete(obj_board_grayregion);
388
                var b = bw_make();
389
                if (type == "idcard")
390
                {
391
                    b.xoff = 16;
392
                    b.side = 0;
393
                    b.boxleft = 16;
394
                    b.boxright = 18;
395
                }
396
                con = 4.5;
397
            }
398
            else
399
            {
400
                timer = 0;
401
                con = 4.6;
402
                if (type == "camera")
403
                {
404
                    if (room != room_dw_puzzlecloset_3)
405
                    {
406
                        makestars = true;
407
                        depth = player.depth - 1;
408
                        timer = 0;
409
                        con = 13;
410
                    }
411
                    else
412
                    {
413
                        global.flag[1244 parent_got_camera] = 1;
414
                    }
415
                }
416
            }
417
            if (type == "camera" || type == "voucher" || type == "bonus" || type == "idcard")
418
            {
419
                depth = player.depth - 1;
420
                if (type != "camera")
421
                    con = 19;
422
                timer = 0;
423
                if (room == room_dw_puzzlecloset_3)
424
                {
425
                    con = -99;
426
                    scr_delay_var("con", 19, 30);
427
                }
428
            }
429
            makestars = true;
430
        }
431
    }
432
}
433
if (con == 4.6)
434
{
435
    timer++;
436
    if (timer == 30)
437
        con = 4.5;
438
}
439
if (con == 4.5 && !bw_ex())
440
{
441
    timer = 0;
442
    makestars = false;
443
    depth = 5000;
444
    var slot = 0;
445
    if (type == "key" && room == room_board_2)
446
        slot = 5.25;
447
    if (type == "q")
448
    {
449
        slot = 1;
450
        if (room == room_board_3)
451
            slot = 0;
452
    }
453
    if (type == "sunmoonstone")
454
        slot = 3;
455
    if (type == "rouxlsblock")
456
    {
457
        global.flag[1237 got_rouxls_block] = 1;
458
        slot = 4;
459
    }
460
    if (type == "lancer")
461
    {
462
        slot = 3;
463
        if (room == room_board_3)
464
            slot = 1;
465
        image_speed = 0.5;
466
        if (room == room_board_2)
467
            slot = 2;
468
    }
469
    if (type == "deodorant" || type == "ribbon")
470
        slot = -1;
471
    if (slot != -1)
472
    {
473
        desigx = 0;
474
        desigy = 0;
475
        if (i_ex(obj_board_inventory))
476
        {
477
            desigx = obj_board_inventory.x + 8;
478
            desigy = obj_board_inventory.y + 10 + (48 * slot);
479
        }
480
        
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, desigx, 20, 2, "in");
481
        
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, desigy, 20, 2, "out");
482
        con = 5;
483
    }
484
    else
485
    {
486
        con = 6;
487
    }
488
}
489
if (con == 5)
490
{
491
    if (x == desigx && y == desigy)
492
    {
493
        if (type == "key")
494
        {
495
            obj_board_inventory.keycount++;
496
            global.flag[1025 board_key_count]++;
497
            global.flag[1122 board_key_count_2]++;
498
        }
499
        if (type == "sunmoonstone")
500
            obj_board_inventory.sunmoonstone = 1;
501
        if (type == "rouxlsblock")
502
            obj_board_inventory.rouxlsblock = 1;
503
        if (type == "q")
504
            obj_board_inventory.qcount++;
505
        if (type == "lancer")
506
            obj_board_inventory.lancer++;
507
        if (i_ex(player))
508
            player.fun = 0;
509
        snd_play(snd_item);
510
        global.interact = 0;
511
        timer = 0;
512
        con = 6;
513
    }
514
}
515
if (con == 6)
516
{
517
    timer++;
518
    if (timer == 3)
519
    {
520
        var destroy = true;
521
        if (i_ex(player))
522
            player.fun = 0;
523
        if (type == "deodorant")
524
            player.stink = true;
525
        if (type == "ribbon")
526
            player.ribbon++;
527
        if (type == "deodorant" || type == "ribbon")
528
            snd_play(snd_item);
529
        global.interact = 0;
530
        if (type == "key" && room == room_board_2)
531
        {
532
            obj_b2westshop.keycon = 1;
533
            destroy = false;
534
            con = 100;
535
        }
536
        timer = 0;
537
        if (destroy)
538
            instance_destroy();
539
    }
540
}
541
if (con == 13)
542
{
543
    
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; ...
("no_name");
544
    msgsetloc(0, 
YOU GOT THE CAMERA!Wait for input
"YOU GOT THE \\cYCAMERA\\cW!/", "obj_board_pickup_slash_Step_0_gml_517_0"
);
545
    msgnextsubloc("PRESS \\cY~1\\cW TO TAKE A PICTURE!/%", 
scr_get_input_name
scr_get_input_name

function
scr_get_input_name(arg0)
{ var _control = "[?]"; if (global.is_console || obj_gamecontroller.gamepad_active) { _control = global.input_g[arg0]; if (_control == gp_padr) return "\\*D "; if (_control == gp_padl) return "\\*A "; if (_control == gp_padu) return "\\*W "; if (_control == gp_padd) return "\\*S "; if (_control == global.button0) return "\\*Z "; if (_control == global.button1) return "\\*X "; if (_control == global.button2) return "\\*C "; } var left_bracket = (global.lang == "en") ? "[" : "["; var right_bracket = (global.lang == "en") ? "]" : "]"; _control = left_bracket + global.asc_def[global.input_k[arg0]] + right_bracket; if (!is_string(_control)) _control = "[?]"; else return _control; }
(4), "obj_board_pickup_slash_Step_0_gml_518_0");
546
    bw_make();
547
    con = 14;
548
}
549
if (con == 14 && !bw_ex())
550
    con = 19;
551
if (con == 20)
552
{
553
    
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");
554
    
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; } } }
("ralsei");
555
    ralsei.follow = 0;
556
    depth = kris.depth - 10;
557
    global.interact = 1;
558
    if (i_ex(player))
559
    {
560
        with (player)
561
        {
562
            fun = 1;
563
            sprite_index = dsprite;
564
            scr_delay_var("sprite_index", lsprite, spintime * 3);
565
            scr_delay_var("sprite_index", usprite, spintime * 4);
566
            scr_delay_var("sprite_index", rsprite, spintime * 5);
567
            scr_delay_var("sprite_index", dsprite, spintime * 6);
568
            scr_delay_var("sprite_index", lsprite, spintime * 7);
569
            scr_delay_var("sprite_index", usprite, spintime * 8);
570
            scr_delay_var("sprite_index", rsprite, spintime * 9);
571
            scr_delay_var("sprite_index", dsprite_item, spintime * 10);
572
        }
573
        
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, player.x, transitiontime, 2, "in");
574
        
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, player.y - 32 - 8, transitiontime, 2, "out");
575
    }
576
    timer = 0;
577
    con = 21;
578
}
579
if (con == 21)
580
{
581
    depth = kris.depth - 10;
582
    timer++;
583
    if (timer == transitiontime)
584
    {
585
        makestars = true;
586
        snd_play(snd_link_sfx_itemget);
587
        con = 22;
588
    }
589
}
590
if (con == 30 && obj_board_camera.con == 0)
591
{
592
    with (susie)
593
        path_end();
594
    with (ralsei)
595
    {
596
        follow = 0;
597
        path_end();
598
    }
599
    player = susie;
600
    with (player)
601
    {
602
        fun = 1;
603
        sprite_index = dsprite;
604
        scr_delay_var("sprite_index", lsprite, spintime * 3);
605
        scr_delay_var("sprite_index", usprite, spintime * 4);
606
        scr_delay_var("sprite_index", rsprite, spintime * 5);
607
        scr_delay_var("sprite_index", dsprite, spintime * 6);
608
        scr_delay_var("sprite_index", lsprite, spintime * 7);
609
        scr_delay_var("sprite_index", usprite, spintime * 8);
610
        scr_delay_var("sprite_index", rsprite, spintime * 9);
611
        scr_delay_var("sprite_index", dsprite_item, spintime * 10);
612
    }
613
    
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, player.x, transitiontime, 2, "in");
614
    
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, player.y - 32 - 8, transitiontime, 2, "out");
615
    scr_delay_var("makestars", true, transitiontime);
616
    snd_play_delay(snd_link_sfx_itemget, transitiontime);
617
    depth = susie.depth - 10;
618
    global.interact = 1;
619
    timer = 0;
620
    con++;
621
    with (obj_b1power)
622
        skipredo = true;
623
}
624
if (con == 31 && obj_board_camera.con == 0)
625
{
626
    timer++;
627
    if (timer == transitiontime)
628
    {
629
        player = susie;
630
        con++;
631
    }
632
}
633
if (con == 72)
634
{
635
    var holdDelay = 60;
636
    timer++;
637
    if (timer == 1)
638
    {
639
        snd_free_all();
640
        safe_delete(obj_board_b1swordentrance);
641
        player.facing = 0;
642
        snd_play(snd_link_secret_bad);
643
        with (obj_event_manager)
644
            trigger_event(UnknownEnum.Value_0, UnknownEnum.Value_26);
645
    }
646
    if (timer == (1 + holdDelay))
647
    {
648
        transition = instance_create(x, y, obj_board_transition);
649
        with (transition)
650
            transitionspeed = 5;
651
    }
652
    if (i_ex(transition))
653
    {
654
        if (transition.con == 3)
655
        {
656
            with (obj_board_camera)
657
            {
658
                if (con == 0)
659
                {
660
                    global.interact = 1;
661
                    shift = "warp";
662
                    warpx = 896;
663
                    warpy = 1344;
664
                    playerX = 1072;
665
                    playerY = 1456;
666
                    if (room == room_board_2_sword)
667
                    {
668
                        warpx = 1664;
669
                        warpy = 3136;
670
                        playerX = 1744;
671
                        playerY = 3216;
672
                    }
673
                    if (room == room_board_3_sword)
674
                    {
675
                        warpx = 1664;
676
                        warpy = 576;
677
                        playerX = 1856;
678
                        playerY = 704;
679
                    }
680
                    instawarp = true;
681
                }
682
            }
683
        }
684
    }
685
    global.interact = 1;
686
    if (timer > (1 + holdDelay + 10) && !i_ex(obj_board_transition))
687
    {
688
        if (room == room_board_1_sword || room == room_board_2_sword)
689
        {
690
            var pitch = 1;
691
            if (room == room_board_2_sword)
692
                pitch = 0.9;
693
            mus_play_ext("board_sword_music.ogg", 1, 1, pitch);
694
        }
695
        if (room == room_board_3_sword)
696
        {
697
            global.currentsong[0] = snd_init("board_ocean.ogg");
698
            global.currentsong[1] = mus_loop_ext(global.currentsong[0], 1, 1);
699
        }
700
        player.canfreemove = true;
701
        player.fun = false;
702
        player.sword = true;
703
        instance_destroy();
704
        global.interact = 0;
705
    }
706
}
707
if (con == 19 && !bw_ex())
708
{
709
    timer++;
710
    var camtime = 8;
711
    if (timer == 1)
712
    {
713
        depth = player.depth + 1;
714
        
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, y + 32, camtime, 2, "in");
715
    }
716
    if (timer == (1 + camtime))
717
    {
718
        if (type == "camera")
719
        {
720
            player.camera = true;
721
            if (room == room_dw_puzzlecloset_3)
722
            {
723
                if (global.flag[1150 parent_lock_3] < 4)
724
                    global.flag[1150 parent_lock_3] = 4;
725
                with (obj_b3bs_console)
726
                    nocamera = false;
727
            }
728
        }
729
        if (type == "idcard")
730
            global.flag[1097 idcard_puzz_found] = 2;
731
        if (type == "voucher")
732
            
scr_board_score
scr_board_score

function
scr_board_score(arg0)
{ var scoreadder = instance_create(x, y, obj_board_scoreAdder); scoreadder.scoreamount = arg0; if (argument_count == 2) scoreadder.mysnd = argument1; } function scr_board_score_set(arg0) { global.flag[1044 points] = arg0; }
(1000);
733
        if (type == "bonus")
734
            
scr_board_score
scr_board_score

function
scr_board_score(arg0)
{ var scoreadder = instance_create(x, y, obj_board_scoreAdder); scoreadder.scoreamount = arg0; if (argument_count == 2) scoreadder.mysnd = argument1; } function scr_board_score_set(arg0) { global.flag[1044 points] = arg0; }
(500);
735
        player.canfreemove = true;
736
        player.fun = 0;
737
        player.facing = 0;
738
        global.interact = 0;
739
        snd_play(snd_item);
740
        instance_destroy();
741
    }
742
}
743
if (con == 100)
744
{
745
    timer++;
746
    if (timer == 30)
747
    {
748
        snd_play(snd_fall);
749
        gravity = 0.75;
750
    }
751
    if (timer > 45)
752
    {
753
        image_alpha *= 0.9;
754
        if (y > 480)
755
            instance_destroy();
756
    }
757
}
758
if (con > 2 && con < 5)
759
    depth = player.depth;
760
if (makestars == true)
761
{
762
    var stardepth = player.depth + 1;
763
    makestarstimer++;
764
    if ((makestarstimer % 2) == 0)
765
    {
766
        var star = 
scr_board_marker
scr_board_marker

function
scr_board_marker()
{ var _thismarker = instance_create(argument0, argument1, obj_board_marker); _thismarker.sprite_index = argument2; _thismarker.image_xscale = 2; _thismarker.image_yscale = 2; if (argument_count >= 4) _thismarker.image_speed = argument3; if (argument_count >= 5) { if (argument4 != -1) _thismarker.depth = argument4; } if (argument_count >= 6) _thismarker.image_xscale = argument5; if (argument_count >= 6) _thismarker.image_yscale = argument5; if (argument_count >= 7) _thismarker.animateonce = argument6; return _thismarker; }
(x - xoff, y - yoff, spr_board_star_8px, 0, stardepth);
767
        with (star)
768
        {
769
            direction = other.makestarstimer * 20;
770
            speed = 5;
771
            friction = 0.25;
772
            image_index = irandom(3);
773
            
scr_doom
scr_doom

function
scr_doom(arg0, arg1)
{ with (instance_create_depth(0, 0, 0, obj_doom)) { alarm[0] target = arg0; } }
(id, random_range(13, 16));
774
        }
775
        star = 
scr_board_marker
scr_board_marker

function
scr_board_marker()
{ var _thismarker = instance_create(argument0, argument1, obj_board_marker); _thismarker.sprite_index = argument2; _thismarker.image_xscale = 2; _thismarker.image_yscale = 2; if (argument_count >= 4) _thismarker.image_speed = argument3; if (argument_count >= 5) { if (argument4 != -1) _thismarker.depth = argument4; } if (argument_count >= 6) _thismarker.image_xscale = argument5; if (argument_count >= 6) _thismarker.image_yscale = argument5; if (argument_count >= 7) _thismarker.animateonce = argument6; return _thismarker; }
(x - xoff, y - yoff, spr_board_star_8px, 0, stardepth);
776
        with (star)
777
        {
778
            direction = (other.makestarstimer * 20) + 180;
779
            speed = 5;
780
            friction = 0.25;
781
            image_index = irandom(3);
782
            
scr_doom
scr_doom

function
scr_doom(arg0, arg1)
{ with (instance_create_depth(0, 0, 0, obj_doom)) { alarm[0] target = arg0; } }
(id, random_range(13, 16));
783
        }
784
    }
785
    if (makestarstimer >= 16)
786
        makestars = false;
787
}
788
if (
scr_debug
scr_debug

function
scr_debug()
{ if (global.debug == 1) return 1; }
())
789
{
790
    if (type == "sword")
791
    {
792
        if (keyboard_check_pressed(ord("I")))
793
            setxy(obj_mainchara_board.x, obj_mainchara_board.y);
794
    }
795
}
796
797
enum UnknownEnum
798
{
799
    Value_0,
800
    Value_26 = 26
801
}