Deltarune (Chapter 4) script viewer

← back to main script listing

gml_Object_obj_dw_churchb_windows_Create_0

(view raw script w/o annotations or w/e)
1
con = 0;
2
timer = 0;
3
init = 0;
4
siner = 0;
5
layer_set_visible("DEBUG_ASSETS", 0);
6
if (
scr_debug
scr_debug

function
scr_debug()
{ if (global.debug == 1) return 1; }
())
7
{
8
    if (keyboard_check(ord("P")))
9
    {
10
        if (global.flag[1573] == 0)
11
        {
12
            global.flag[1573] = 7;
13
            debug_print("Next entrance will go to man");
14
        }
15
        else
16
        {
17
            global.flag[1573] = 0;
18
            debug_print("Reset man entrance");
19
            debug_print();
20
        }
21
    }
22
}
23
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++; } }
(0);
24
if (global.plot >= 242)
25
    
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);
26
shadowinit = 0;
27
loopactive = 1;
28
loopcount = 0;
29
leftx = 99;
30
rightx = 99;
31
goback1 = -1;
32
goback2 = -1;
33
door1 = 0;
34
door2 = 0;
35
if (global.entrance == 9)
36
    loopactive = 3;
37
roomstart = 15;
38
var spritesArray = layer_get_all_elements("DEBUG_ASSETS");
39
for (var i = 0; i < array_length(spritesArray); i++)
40
{
41
    if (layer_sprite_get_sprite(spritesArray[i]) == 2269)
42
        npc[0] = scr_makenpc_fromasset(spritesArray[i]);
43
    if (layer_sprite_get_sprite(spritesArray[i]) == 2094)
44
        npc[1] = scr_makenpc_fromasset(spritesArray[i]);
45
    if (layer_sprite_get_sprite(spritesArray[i]) == 3020)
46
        npc[2] = scr_makenpc_fromasset(spritesArray[i]);
47
    if (layer_sprite_get_sprite(spritesArray[i]) == 1614)
48
        npc[3] = scr_makenpc_fromasset(spritesArray[i]);
49
    if (layer_sprite_get_sprite(spritesArray[i]) == 1510)
50
        moss = scr_makenpc_fromasset(spritesArray[i]);
51
}
52
for (var i = 0; i < array_length(npc); i++)
53
{
54
    with (npc[i])
55
    {
56
        dontreset = false;
57
        issolid = false;
58
        xstart = x;
59
        ystart = y;
60
        y = -200;
61
        mystring = i;
62
    }
63
}
64
with (moss)
65
{
66
    init = 0;
67
    issolid = false;
68
    marker.depth = 190000;
69
    if (global.flag[1592] == 1)
70
        setxy(room_width * 4, room_height);
71
}