Deltarune (Chapter 3) script viewer

← back to main script listing

gml_Object_obj_dw_b3bs_mysterypuzzle_Create_0

(view raw script w/o annotations or w/e)
1
if (
scr_debug
scr_debug

function
scr_debug()
{ if (global.debug == 1) return 1; }
())
2
    
scr_setparty
scr_setparty

function
scr_setparty(arg0, arg1, arg2)
{ var kris = obj_mainchara; var slot = 0; var __make = true; if (!i_ex(kris)) __make = false;
scr_losechar();
safe_delete(obj_caterpillarchara); if (arg0 == true) {
scr_getchar(2);
if (__make) { with (
scr_makecaterpillar(kris.x, kris.y, 2, slot))
{ halign = (global.darkzone == 0) ? 3 : 6; valign = (global.darkzone == 0) ? 6 : 16; x -= halign; y -= valign; } } slot++; } if (arg1 == true) {
scr_getchar(3);
if (__make) { with (
scr_makecaterpillar(kris.x, kris.y, 3, slot))
{ halign = 2; valign = 12; x -= halign; y -= valign; } } slot++; } if (arg2 == true) {
scr_getchar(4);
if (__make) { with (
scr_makecaterpillar(kris.x, kris.y, 4, slot))
{ halign = (global.darkzone == 0) ? 2 : 4; valign = (global.darkzone == 0) ? 9 : 18; x -= halign; y -= valign; } } slot++; } }
(1, 1, 0);
3
depth = 999998;
4
marksiner = 0;
5
tile[0] = instance_create(board_tilex(4), board_tiley(2), obj_b3bs_switchtile);
6
tile[1] = instance_create(board_tilex(5), board_tiley(2), obj_b3bs_switchtile);
7
tile[2] = instance_create(board_tilex(3), board_tiley(3), obj_b3bs_switchtile);
8
tile[3] = instance_create(board_tilex(4), board_tiley(3), obj_b3bs_switchtile);
9
tile[4] = instance_create(board_tilex(5), board_tiley(3), obj_b3bs_switchtile);
10
tile[5] = instance_create(board_tilex(6), board_tiley(3), obj_b3bs_switchtile);
11
tile[6] = instance_create(board_tilex(3), board_tiley(4), obj_b3bs_switchtile);
12
tile[7] = instance_create(board_tilex(4), board_tiley(4), obj_b3bs_switchtile);
13
tile[8] = instance_create(board_tilex(5), board_tiley(4), obj_b3bs_switchtile);
14
tile[9] = instance_create(board_tilex(6), board_tiley(4), obj_b3bs_switchtile);
15
tile[10] = instance_create(board_tilex(4), board_tiley(5), obj_b3bs_switchtile);
16
tile[11] = instance_create(board_tilex(5), board_tiley(5), obj_b3bs_switchtile);
17
tile[3].image_index = 1;
18
tile[8].image_index = 1;
19
con = 0;
20
update = 0;
21
timer = 0;
22
resettile = false;
23
resetcon = 0;
24
resettime = 0;
25
block = -4;
26
noreset = false;
27
global.flag[1018 tried_preegg_board] = 1;
28
global.flag[1020 got_power_croissant] = 1;
29
if (global.flag[1111 save_preegg_block] > 0)
30
{
31
    block = instance_create(round(global.flag[1109 save_preegg_x] / 32) * 32, round(global.flag[1110 save_preegg_y] / 32) * 32, obj_pushableblock_board);
32
    with (obj_b3bs_switchtile)
33
        instance_destroy();
34
    con = 3;
35
    update = false;
36
}
37
spike[0] = 
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; }
(120, 320, spr_spiketile);
38
spike[1] = 
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; }
(160, 320, spr_spiketile);
39
spike[2] = 
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; }
(120, 360, spr_spiketile);
40
spike[3] = 
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; }
(160, 360, spr_spiketile);
41
for (var i = 0; i < 4; i++)
42
{
43
    spike[i].image_index = 0;
44
    if (global.flag[1111 save_preegg_block] == 2)
45
        spike[i].image_index = 1;
46
    spike[i].image_speed = 0;
47
    spike[i].depth = 1000000;
48
    spike[i].image_blend = merge_color(c_white, #371E0F, 0.5);
49
}
50
floorblock = -4;
51
floorblock = instance_create(120, 320, obj_solidblocksized);
52
scr_darksize
scr_darksize

function
scr_darksize()
{ var inst = id; if (argument_count) inst = argument0; inst.image_xscale = 2; inst.image_yscale = 2; }
(floorblock);
53
switchtile1 = instance_create(224, 96, obj_board_blocktrig);
54
switchtile2 = instance_create(320, 96, obj_board_blocktrig);
55
yend = -1;
56
if (global.flag[1111 save_preegg_block] == 2)
57
{
58
    con = 3;
59
    safe_delete(floorblock);
60
    with (switchtile1)
61
        used = true;
62
    with (switchtile2)
63
        used = true;
64
    for (var i = 0; i < 4; i++)
65
        spike[i].image_index = 1;
66
}
67
endcon = 0;
68
if (global.flag[1055 sword_route_progress] >= 6)
69
{
70
    
scr_marker_ext
scr_marker_ext

function
scr_marker_ext(arg0, arg1, arg2, arg3 = 1, arg4 = 1, arg5 = 0, arg6 = 0, arg7 = 16777215, arg8 = depth, arg9 = false, arg10 = -1, arg11 = 1)
{ var thismarker = instance_create(arg0, arg1, obj_marker); with (thismarker) { depth = arg8; sprite_index = arg2; image_speed = arg5; image_xscale = arg3; image_yscale = arg4; image_index = arg6; image_blend = arg7; image_alpha = arg11; if (arg9)
scr_depth();
} if (arg10 > 0)
scr_doom(thismarker, arg10);
return thismarker; }
(128, 64, spr_pxwhite, 352, 224, undefined, undefined, c_black, 99801);
71
    endcon = 1;
72
    con = 999;
73
    global.flag[1111 save_preegg_block] = 2;
74
    with (obj_pushableblock_board)
75
        visible = false;
76
}