Deltarune (Chapter 4) script viewer

← back to main script listing

gml_Object_obj_ch4_DCA05_Create_0

(view raw script w/o annotations or w/e)
1
con = -1;
2
customcon = 0;
3
lcon = 0;
4
if (
scr_debug
scr_debug

function
scr_debug()
{ if (global.debug == 1) return 1; }
())
5
    
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);
6
stool_npc = instance_create(102, 226, obj_npc_room);
7
with (stool_npc)
8
{
9
    extflag = "stool";
10
    sprite_index = spr_dw_church_stool;
11
    
scr_depth
scr_depth

function
scr_depth(arg0 = id, arg1 = 0)
{ with (arg0) depth = 100000 - ((y * 10) + (sprite_height * 10) + (arg1 * 10)); }
();
12
}
13
var doorloc = [];
14
layer_set_visible("DEBUG_ASSETS", 0);
15
var spritesArray = layer_get_all_elements("DEBUG_ASSETS");
16
for (var i = 0; i < array_length(spritesArray); i++)
17
{
18
    if (layer_sprite_get_sprite(spritesArray[i]) == 4123)
19
    {
20
        book_marker = scr_marker_fromasset(spritesArray[i]);
21
        book_marker.depth = layer_get_depth("Tiles_new_books") - 10;
22
    }
23
    if (layer_sprite_get_sprite(spritesArray[i]) == 34)
24
    {
25
        door_marker = scr_marker_fromasset(spritesArray[i]);
26
        with (door_marker)
27
        {
28
            
scr_depth
scr_depth

function
scr_depth(arg0 = id, arg1 = 0)
{ with (arg0) depth = 100000 - ((y * 10) + (sprite_height * 10) + (arg1 * 10)); }
();
29
            image_speed = 0;
30
            if (global.plot >= 150)
31
                image_index = 1;
32
        }
33
    }
34
}
35
if (global.plot < 150)
36
{
37
    door_readable = instance_create(door_marker.x, 180, obj_readable_room1);
38
    with (door_readable)
39
    {
40
        extflag = "door";
41
        image_xscale = 4;
42
    }
43
    door_collider = instance_create(door_marker.x, 160, obj_solidblockDark);
44
    with (door_collider)
45
        image_xscale = 2;
46
    book_readable = instance_create(book_marker.x - 6, book_marker.y, obj_readable_room1);
47
    with (book_readable)
48
    {
49
        extflag = "book";
50
        image_yscale = 4;
51
    }
52
}
53
else
54
{
55
    book_marker.image_blend = c_black;
56
}
57
if (global.plot >= 140 && global.plot < 150)
58
{
59
    con = 0;
60
    with (instance_create(632, 222, obj_solidblocksized))
61
    {
62
        sprite_index = spr_doorAny;
63
        
scr_size
scr_size

function
scr_size(arg0 = image_xscale, arg1 = image_yscale, arg2 = id)
{ with (arg2) { image_xscale = arg0; image_yscale = arg1; } }
(1, 3);
64
    }
65
    gerson_npc = instance_create(250, 170, obj_npc_gerson);
66
    with (gerson_npc)
67
    {
68
        extflag = "gerson";
69
        current_state = 4;
70
        facing_right = true;
71
        
scr_depth
scr_depth

function
scr_depth(arg0 = id, arg1 = 0)
{ with (arg0) depth = 100000 - ((y * 10) + (sprite_height * 10) + (arg1 * 10)); }
();
72
    }
73
    ralsei_marker = 
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; }
(camerax() - 100, cameray() - 100, spr_ralsei_splat);
74
    if (
scr_debug
scr_debug

function
scr_debug()
{ if (global.debug == 1) return 1; }
() && global.tempflag[90] == 1)
75
    {
76
        obj_mainchara.x = 560;
77
        with (obj_caterpillarchara)
78
            x = obj_mainchara.x + 80;
79
    }
80
    susie_throw = false;
81
    susie_throw_timer = 0;
82
    ralsei_splat_fx = false;
83
    ralsei_splat_toggle = false;
84
    kris_splat = false;
85
    kris_splat_timer = 0;
86
    susie_hide = false;
87
    susie_show = false;
88
    susie_shadow = 0;
89
    explore = false;
90
    explore_con = 0;
91
    ralsei_pause_follow = false;
92
}
93
else
94
{
95
}