Deltarune (Chapter 4) script viewer

← back to main script listing

gml_Object_obj_room_church_choir_Create_0

(view raw script w/o annotations or w/e)
1
var closet_readable = instance_create(184, 50, obj_readable_room1);
2
with (closet_readable)
3
{
4
    extflag = "closet";
5
    image_xscale = 1.6;
6
}
7
var wardrobe_readable = instance_create(105, 60, obj_readable_room1);
8
with (wardrobe_readable)
9
{
10
    extflag = "wardrobe";
11
    image_xscale = 2;
12
}
13
var bells_readable = instance_create(64, 70, obj_readable_room1);
14
with (bells_readable)
15
{
16
    extflag = "bells";
17
    image_xscale = 1.5;
18
}
19
var piano_readable = instance_create(60, 130, obj_readable_room1);
20
with (piano_readable)
21
{
22
    extflag = "piano";
23
    image_yscale = 1.4;
24
}
25
lightning_active = false;
26
if (global.plot < 210)
27
{
28
    instance_create(0, 0, obj_church_choir_light);
29
}
30
else
31
{
32
    blackall = 
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; }
(-10, -10, spr_pixel_white);
33
    blackall.image_xscale = 999;
34
    blackall.image_yscale = 999;
35
    blackall.depth = 100;
36
    blackall.image_blend = c_black;
37
    blackall.image_alpha = 0;
38
    lightning_active = false;
39
    lightning_timer = 0;
40
    palette_index = 2;
41
    closet_door = instance_create(180, 19, obj_marker_palette);
42
    closet_door.sprite_index = bg_church_choir_door;
43
    closet_door.image_speed = 0;
44
    closet_door.image_index = 0;
45
    with (closet_door)
46
        
scr_depth
scr_depth

function
scr_depth(arg0 = id, arg1 = 0)
{ with (arg0) depth = 100000 - ((y * 10) + (sprite_height * 10) + (arg1 * 10)); }
();
47
    bg_vfx = instance_create(0, 0, obj_church_night_vfx);
48
    bg_vfx.depth = 1000110;
49
    sk_marker = 
scr_marker
scr_marker

function
scr_marker(arg0, arg1, arg2)
{ thismarker = instance_create(arg0, arg1, obj_marker); with (thismarker) { sprite_index = arg2; image_speed = 0; } return thismarker; }
(0, 0, spr_lw_church_choir_susie_kris_lightning);
50
    with (sk_marker)
51
    {
52
        depth = 990;
53
        visible = 0;
54
    }
55
    pal_swap_layer_init();
56
    pal_swap_enable_layer("ASSETS_Items");
57
    pal_swap_set_layer(3934, 2, "ASSETS_Items", false);
58
    pal_swap_reset();
59
    if (global.plot >= 290 && global.plot < 300)
60
    {
61
        with (obj_caterpillarchara)
62
            visible = 0;
63
    }
64
}
65
con = -1;
66
customcon = 0;
67
68
answer_choice = function(arg0, arg1)
69
{
70
    switch (arg0)
71
    {
72
        case 1400:
73
            if (arg1 == 0)
74
            {
75
                con = 10;
76
                
scr_flag_set
scr_flag_set

function
scr_flag_set(arg0, arg1)
{ global.flag[arg0] = arg1; if (
scr_debug())
show_debug_message("*** flag [" + string(arg0) + "] updated: " + string(arg1) + " | " + scr_flag_name_get(arg0)); } function scr_setflag(arg0, arg1) {
scr_flag_set(arg0, arg1);
}
(1510, arg1 + 1);
77
            }
78
            break;
79
        case 1402:
80
            if (arg1 == 0)
81
                con = 20;
82
            break;
83
        case 1404:
84
            
scr_flag_set
scr_flag_set

function
scr_flag_set(arg0, arg1)
{ global.flag[arg0] = arg1; if (
scr_debug())
show_debug_message("*** flag [" + string(arg0) + "] updated: " + string(arg1) + " | " + scr_flag_name_get(arg0)); } function scr_setflag(arg0, arg1) {
scr_flag_set(arg0, arg1);
}
(1511, arg1 + 1);
85
            if (arg1 == 0)
86
                con = 40;
87
            else
88
                con = 50;
89
            break;
90
        case 1406:
91
            
scr_flag_set
scr_flag_set

function
scr_flag_set(arg0, arg1)
{ global.flag[arg0] = arg1; if (
scr_debug())
show_debug_message("*** flag [" + string(arg0) + "] updated: " + string(arg1) + " | " + scr_flag_name_get(arg0)); } function scr_setflag(arg0, arg1) {
scr_flag_set(arg0, arg1);
}
(1512, arg1 + 1);
92
            if (arg1 == 0)
93
                con = 60;
94
            else if (arg1 == 1)
95
                con = 70;
96
            else
97
                con = 80;
98
            break;
99
    }
100
};
101
102
inspect_piano = function()
103
{
104
    con = 35;
105
};