Deltarune (Chapter 4) script viewer

← back to main script listing

gml_Object_obj_dw_church_darkmaze_Create_0

(view raw script w/o annotations or w/e)
1
layer_set_visible("DEBUG_ASSETS", 0);
2
global.flag[7 disable_menu?] = 0;
3
init = 0;
4
con = 0;
5
ccon = 0;
6
gcon = 0;
7
candy = 0;
8
subcon = 0;
9
con2 = 0;
10
early = 0;
11
fixsusie = false;
12
encounterno = 150;
13
encounterflag = 1782;
14
piano = instance_find(obj_church_piano_playable, 0);
15
upblock = instance_create(1320, 520, obj_solidblocksized);
16
with (upblock)
17
{
18
    visible = false;
19
    sprite_index = spr_pxwhite;
20
    
scr_size
scr_size

function
scr_size(arg0 = image_xscale, arg1 = image_yscale, arg2 = id)
{ with (arg2) { image_xscale = arg0; image_yscale = arg1; } }
(80, 80);
21
}
22
rightblock = -4;
23
makerightblock = true;
24
layer_set_visible("FAKE_TILES", true);
25
timer = 0;
26
gtimer = 0;
27
gerson = 0;
28
leavecon = 0;
29
cutscene_master = 0;
30
candymarker = 
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_alt();
} if (arg10 > 0)
scr_doom(thismarker, arg10);
return thismarker; } function scr_marker_fromasset(arg0, arg1 = depth, arg2 = false) { if (is_undefined(arg0)) { debug_message("Warning: scr_marker_fromasset() sprite_instance didn't exist"); return -4; } var sprite = layer_sprite_get_sprite(arg0); var index = layer_sprite_get_index(arg0); var imagespeed = layer_sprite_get_speed(arg0); var xscale = layer_sprite_get_xscale(arg0); var yscale = layer_sprite_get_yscale(arg0); var angle = layer_sprite_get_angle(arg0); var blend = layer_sprite_get_blend(arg0); var alpha = layer_sprite_get_alpha(arg0); var xloc = layer_sprite_get_x(arg0); var yloc = layer_sprite_get_y(arg0); var thismarker = instance_create_depth(xloc, yloc, arg1, obj_marker); with (thismarker) { sprite_index = sprite; image_index = index; image_speed = imagespeed; image_xscale = xscale; image_yscale = yscale; image_angle = angle; image_blend = blend; image_alpha = alpha; if (arg2)
scr_depth_alt(id, arg2);
} return thismarker; } function scr_assetgetinfo(arg0) { var sprite = layer_sprite_get_sprite(arg0); var index = layer_sprite_get_index(arg0); var xloc = layer_sprite_get_x(arg0); var yloc = layer_sprite_get_y(arg0); var xscale = layer_sprite_get_xscale(arg0); var yscale = layer_sprite_get_yscale(arg0); var angle = layer_sprite_get_angle(arg0); var blend = layer_sprite_get_blend(arg0); var alpha = layer_sprite_get_alpha(arg0); var imagespeed = layer_sprite_get_speed(arg0); return [sprite, index, xloc, yloc, xscale, yscale, angle, blend, alpha, imagespeed]; }
(2080, 386, spr_church_candybowl, 2, 2, 0, undefined, undefined, undefined, 1);
31
forceside = -1;
32
darkinit = 0;
33
if (global.plot < 150)
34
    global.plot = 150;
35
if (
scr_debug
scr_debug

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

function
scr_setparty(arg0 = false, arg1 = false, arg2 = false)
{ 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);
37
visible = true;
38
clamper = 0;
39
if (global.plot == 150)
40
{
41
    if (!snd_is_playing(global.currentsong[1]))
42
    {
43
        global.currentsong[0] = snd_init("gerson_theme_intro.ogg");
44
        global.currentsong[1] = mus_loop_ext(global.currentsong[0], 0.7, 1);
45
    }
46
    clamper = instance_create(1200, 800, obj_camera_clamper);
47
    clamper.xmin = 1040;
48
    clamper.ymin = 640;
49
    clamper.xmax = 1040;
50
    clamper.ymax = 640;
51
    
scr_size
scr_size

function
scr_size(arg0 = image_xscale, arg1 = image_yscale, arg2 = id)
{ with (arg2) { image_xscale = arg0; image_yscale = arg1; } }
(8, 8, clamper);
52
    gerson = instance_create(obj_mainchara.x - 18, 1036, obj_caterpillar_generic);
53
    gerson.sprite_index = spr_gerson_outfit_walk_cane;
54
    gerson.usprite = spr_gerson_outfit_walk_up;
55
    gerson.rsprite = spr_gerson_outfit_walk_cane_right;
56
    gerson.targetdist = 40;
57
    gerson.halign = 18;
58
    gerson.valign = 4;
59
    gerson.allowdown = false;
60
    gerson.downfavor = "right";
61
    gerson.depthyoff = 4;
62
    gerson.facing = 2;
63
    
scr_size
scr_size

function
scr_size(arg0 = image_xscale, arg1 = image_yscale, arg2 = id)
{ with (arg2) { image_xscale = arg0; image_yscale = arg1; } }
(2, 2, gerson);
64
    with (obj_border_controller)
65
        hide_border(0.025);
66
}
67
hidecater = 0;
68
sumark = 0;
69
ramark = 0;
70
germark = 0;
71
candyint = 0;
72
sucandyint = 0;
73
racandyint = 0;
74
takecount = 0;
75
depth = 0;
76
candytimer = 0;
77
gueimark = 0;
78
musicchange = 0;
79
gerint = 0;
80
layer_set_visible("WALLS_ALT", 0);
81
if (global.plot > 150)
82
{
83
    layer_set_visible("WALLS_ALT", 1);
84
    makerightblock = false;
85
    safe_delete(upblock);
86
    with (obj_floorswitch)
87
        instance_destroy();
88
    with (obj_church_piano_hint)
89
        instance_destroy();
90
    darkinit = 80;
91
    upblock = instance_create(1320, 520, obj_solidblocksized);
92
    with (upblock)
93
    {
94
        image_blend = c_black;
95
        depth = 999990;
96
        sprite_index = spr_pxwhite;
97
        
scr_size
scr_size

function
scr_size(arg0 = image_xscale, arg1 = image_yscale, arg2 = id)
{ with (arg2) { image_xscale = arg0; image_yscale = arg1; } }
(80, 280);
98
    }
99
    piano.solved = 1;
100
    con = 99999;
101
    if (!snd_is_playing(global.currentsong[1]))
102
    {
103
        global.currentsong[0] = snd_init("church_wip.ogg");
104
        global.currentsong[1] = mus_loop_ext(global.currentsong[0], 0.7, 1);
105
    }
106
    with (obj_church_triggerlight)
107
        instance_destroy();
108
}
109
fakegerblock = instance_create(562, 400, obj_solidblocksized);
110
fakegerblock.image_yscale = 2;
111
animsequence = 0;
112
cup = -4;
113
guei = -4;
114
cuptrig = -4;
115
gueitrig = -4;
116
if (global.plot > 150)
117
{
118
    var spritesArray = layer_get_all_elements("DEBUG_ASSETS");
119
    for (var i = 0; i < array_length(spritesArray); i++)
120
    {
121
        if (layer_sprite_get_sprite(spritesArray[i]) == 5127)
122
        {
123
            guei = scr_marker_fromasset(spritesArray[i], undefined, 1);
124
            guei.image_speed = 0.25;
125
            
scr_depth
scr_depth

function
scr_depth(arg0 = id, arg1 = 0)
{ with (arg0) depth = 100000 - ((y * 10) + (sprite_height * 10) + (arg1 * 10)); }
(guei);
126
        }
127
        if (layer_sprite_get_sprite(spritesArray[i]) == 5585)
128
        {
129
            cup = scr_marker_fromasset(spritesArray[i], undefined, 1);
130
            cup.image_speed = 0.25;
131
            cup.con = 0;
132
            cup.timer = 0;
133
            with (cup)
134
                scr_limitval_upper(id, "y", ystart);
135
            
scr_depth
scr_depth

function
scr_depth(arg0 = id, arg1 = 0)
{ with (arg0) depth = 100000 - ((y * 10) + (sprite_height * 10) + (arg1 * 10)); }
(cup, 10);
136
        }
137
        if (layer_sprite_get_sprite(spritesArray[i]) == 1779)
138
        {
139
            cuptrig = scr_makenpc_fromasset(spritesArray[i], undefined, 1);
140
            cuptrig.marker.visible = false;
141
        }
142
        if (layer_sprite_get_sprite(spritesArray[i]) == 5276)
143
        {
144
            gueitrig = scr_makenpc_fromasset(spritesArray[i], undefined, 1);
145
            gueitrig.marker.visible = false;
146
            gueitrig.timer = 0;
147
        }
148
    }
149
}
150
trippin = 0;
151
canetimer = 0;
152
caught = -4;