Deltarune (Chapter 3) script viewer

← back to main script listing

gml_Object_obj_dw_b3bs_extrapuzzle_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++; } }
(0, 0, 0);
3
marksiner = 0;
4
depth = 999998;
5
update = false;
6
block = 0;
7
bxoff = -128;
8
byoff = 32;
9
if (global.flag[1111 save_preegg_block] > 0 && global.flag[1055 sword_route_progress] < 6)
10
{
11
    block = instance_create(round((global.flag[1109 save_preegg_x] + bxoff) / 32) * 32, round((global.flag[1110 save_preegg_y] + byoff) / 32) * 32, obj_pushableblock_board);
12
    if (global.flag[1109 save_preegg_x] < 352)
13
        block.x = -999;
14
}
15
prefire = 0;
16
if (global.flag[1109 save_preegg_x] == 480 && global.flag[1110 save_preegg_y] == 224)
17
    prefire = 1;
18
solidblock = instance_create(384, 192, obj_board_solid);
19
doorblock = instance_create(640, 40, obj_solidblock);
20
with (doorblock)
21
{
22
    visible = true;
23
    depth = 10000;
24
    image_blend = c_black;
25
    sprite_index = spr_pxwhite;
26
    image_xscale = 640;
27
    image_yscale = 480;
28
}
29
trigger = instance_create(352, 256, obj_board_trigger);
30
with (trigger)
31
{
32
    visible = true;
33
    
scr_darksize
scr_darksize

function
scr_darksize()
{ var inst = id; if (argument_count) inst = argument0; inst.image_xscale = 2; inst.image_yscale = 2; }
();
34
    depth = 999998;
35
    sprite_index = spr_dw_puzzlecloset_mysterytile;
36
}
37
trigd = 0;
38
pressed = 0;
39
doorcon = 0;
40
switchtile = instance_create(512, 128, obj_board_switchtile);
41
camcontrol = true;
42
if (global.flag[1112 solve_nowherepuzz] == 1 || global.flag[1055 sword_route_progress] >= 6)
43
{
44
    camcontrol = false;
45
    doorcon = 3;
46
    safe_delete(doorblock);
47
    with (obj_board_switchtile)
48
        instance_destroy();
49
}
50
debug_message(room_get_name(room) + "start: block x/y=" + string(global.flag[1109 save_preegg_x]) + "|" + string(global.flag[1110 save_preegg_y]));
51
endcon = 0;
52
if (global.flag[1055 sword_route_progress] >= 6)
53
{
54
    
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; }
(192, 64, spr_pxwhite, 384, 256, undefined, undefined, c_black, 99801);
55
    endcon = 1;
56
    global.flag[1111 save_preegg_block] = 2;
57
}
58
roomstart = 0;