Deltarune (Chapter 4) script viewer

← back to main script listing

gml_Object_obj_dw_church_secretpiano_Step_0

(view raw script w/o annotations or w/e)
1
if (!destroyinit)
2
{
3
    with (obj_church_piano_hint)
4
        instance_destroy();
5
    with (obj_church_secretpiano_playable)
6
        instance_destroy();
7
    with (obj_solidblock)
8
    {
9
        if (image_blend == c_red)
10
            instance_destroy();
11
    }
12
    con = 200;
13
    var makeenemy = true;
14
    if (global.flag[encounterflag] == 1)
15
        makeenemy = false;
16
    if (makeenemy)
17
    {
18
        var spritesArray = layer_get_all_elements("DEBUG_ASSETS");
19
        for (var i = 0; i < array_length(spritesArray); i++)
20
        {
21
            if (layer_sprite_get_sprite(spritesArray[i]) == 4549)
22
                chaseloc = scr_assetgetinfo(spritesArray[i]);
23
        }
24
        chaseenemy = instance_create(chaseloc[2], chaseloc[3], obj_dw_churchb_bellchaser);
25
        
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, chaseenemy);
26
        chaseenemy.con = 0.5;
27
        chaseenemy.encounterno = encounterno;
28
        chaseenemy.encounterflag = encounterflag;
29
        chaseenemy.sprite_index = spr_bell_enemy;
30
        chaseenemy.autodepth = 1;
31
        destroyinit = 1;
32
    }
33
}
34
if (con == 0)
35
{
36
    var trig = 0;
37
    with (obj_church_secretpiano_playable)
38
    {
39
        if (solved)
40
            trig = 1;
41
    }
42
    if (trig == 1)
43
        con = 1;
44
}
45
if (con == 1)
46
{
47
    global.interact = 1;
48
    con = 10;
49
    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, -100, spr_pixel_white);
50
    blackall.image_xscale = room_width;
51
    blackall.image_yscale = room_height;
52
    blackall.depth = 100;
53
    blackall.image_alpha = 0;
54
    blackall.image_blend = c_black;
55
    cutscene_master = 
scr_cutscene_make
scr_cutscene_make

function
scr_cutscene_make()
{ _cutscene_master = instance_create(0, 0, obj_cutscene_master); _cutscene_master.master_object = id; return _cutscene_master; }
();
56
    
scr_maincharacters_actors
scr_maincharacters_actors

function
scr_maincharacters_actors()
{ actor_count = 0; kr = 0; kr_actor = instance_create(obj_mainchara.x, obj_mainchara.y, obj_actor);
scr_actor_setup(kr, kr_actor, "kris");
kr_actor.sprite_index = obj_mainchara.sprite_index; kr_actor.depth = obj_mainchara.depth; with (obj_mainchara) visible = 0; for (__jj = 0; __jj < array_length_1d(global.cinstance); __jj++) { if (i_ex(global.cinstance[__jj])) { if (global.cinstance[__jj].name == "susie") { actor_count++; su = __jj + 1; su_actor = instance_create(global.cinstance[__jj].x, global.cinstance[__jj].y, obj_actor);
scr_actor_setup(su, su_actor, "susie");
su_actor.sprite_index = global.cinstance[__jj].sprite_index; su_actor.depth = global.cinstance[__jj].depth; with (global.cinstance[__jj]) visible = 0; } if (global.cinstance[__jj].name == "ralsei") { actor_count++; ra = __jj + 1; ra_actor = instance_create(global.cinstance[__jj].x, global.cinstance[__jj].y, obj_actor);
scr_actor_setup(ra, ra_actor, "ralsei");
ra_actor.sprite_index = global.cinstance[__jj].sprite_index; ra_actor.depth = global.cinstance[__jj].depth; with (global.cinstance[__jj]) visible = 0; } if (global.cinstance[__jj].name == "noelle") { actor_count++; no = __jj + 1; no_actor = instance_create(global.cinstance[__jj].x, global.cinstance[__jj].y, obj_actor);
scr_actor_setup(no, no_actor, "noelle");
no_actor.sprite_index = global.cinstance[__jj].sprite_index; no_actor.depth = global.cinstance[__jj].depth; with (global.cinstance[__jj]) visible = 0; } } } }
();
57
    
c_var_lerp_instance
c_var_lerp_instance

function
c_var_lerp_instance()
{ if (argument_count < 6)
c_cmd_x("var", argument[0], argument[1], argument[2], argument[3], argument[4], 0);
else if (argument_count == 6)
c_cmd_x("var", argument[0], argument[1], argument[2], argument[3], argument[4], argument[5]);
else if (argument_count == 7)
c_cmd_x("var", argument[0], argument[1], argument[2], argument[3], argument[4], string(argument[5]) + string(argument[6]));
} function c_lerp_var_instance() { if (argument_count >= 6)
c_var_lerp_instance(argument0, argument1, argument2, argument3, argument4, argument5);
else if (argument_count >= 7)
c_var_lerp_instance(argument0, argument1, argument2, argument3, argument4, argument5, argument6);
else
c_var_lerp_instance(argument0, argument1, argument2, argument3, argument4);
} function c_lerpvar_instance() { if (argument_count >= 6)
c_var_lerp_instance(argument0, argument1, argument2, argument3, argument4, argument5);
else if (argument_count >= 7)
c_var_lerp_instance(argument0, argument1, argument2, argument3, argument4, argument5, argument6);
else
c_var_lerp_instance(argument0, argument1, argument2, argument3, argument4);
}
(blackall, "image_alpha", 0, 1, 60);
58
    
c_wait
c_wait

function
c_wait(arg0)
{
c_cmd("wait", arg0, 0, 0, 0);
}
(90);
59
    
c_waitcustom
c_waitcustom

function
c_waitcustom()
{
c_cmd("waitcustom", 0, 0, 0, 0);
}
();
60
}
61
if (con == 10 && customcon == 1)
62
{
63
    con = 30;
64
    global.tempflag[90] = 400;
65
    room_persistent = true;
66
    room_goto(room_dw_church_gersonstudy);
67
    exit;
68
}
69
if (con == 30 && customcon == 1 && !d_ex())
70
{
71
    con = 50;
72
    global.tempflag[90] = 0;
73
    room_persistent = false;
74
}
75
if (con == 50 && customcon == 1)
76
{
77
    global.flag[7 disable_menu?] = 0;
78
    con = 55;
79
    customcon = 0;
80
    
c_waitcustom_end
c_waitcustom_end

function
c_waitcustom_end()
{ with (obj_cutscene_master) { cs_wait_custom = 0; waiting = 0; } }
();
81
    
c_var_lerp_instance
c_var_lerp_instance

function
c_var_lerp_instance()
{ if (argument_count < 6)
c_cmd_x("var", argument[0], argument[1], argument[2], argument[3], argument[4], 0);
else if (argument_count == 6)
c_cmd_x("var", argument[0], argument[1], argument[2], argument[3], argument[4], argument[5]);
else if (argument_count == 7)
c_cmd_x("var", argument[0], argument[1], argument[2], argument[3], argument[4], string(argument[5]) + string(argument[6]));
} function c_lerp_var_instance() { if (argument_count >= 6)
c_var_lerp_instance(argument0, argument1, argument2, argument3, argument4, argument5);
else if (argument_count >= 7)
c_var_lerp_instance(argument0, argument1, argument2, argument3, argument4, argument5, argument6);
else
c_var_lerp_instance(argument0, argument1, argument2, argument3, argument4);
} function c_lerpvar_instance() { if (argument_count >= 6)
c_var_lerp_instance(argument0, argument1, argument2, argument3, argument4, argument5);
else if (argument_count >= 7)
c_var_lerp_instance(argument0, argument1, argument2, argument3, argument4, argument5, argument6);
else
c_var_lerp_instance(argument0, argument1, argument2, argument3, argument4);
}
(blackall, "image_alpha", 1, 0, 60);
82
    
c_wait
c_wait

function
c_wait(arg0)
{
c_cmd("wait", arg0, 0, 0, 0);
}
(90);
83
    
c_sel
c_sel

function
c_sel(arg0)
{
c_cmd("select", arg0, 0, 0, 0);
}
(su);
84
    
c_autowalk
c_autowalk

function
c_autowalk(arg0)
{
c_cmd("autowalk", arg0, 0, 0, 0);
}
(0);
85
    
c_sprite
c_sprite

function
c_sprite(arg0)
{
c_cmd("sprite", arg0, 0, 0, 0);
}
(spr_susie_head_scratch_dw);
86
    
c_imagespeed
c_imagespeed

function
c_imagespeed(arg0)
{
c_cmd("imagespeed", arg0, 0, 0, 0);
}
(0.2);
87
    
c_addxy
c_addxy

function
c_addxy(arg0, arg1)
{
c_cmd("addxy", arg0, arg1, 0, 0);
}
(0, -6);
88
    
c_msgside
c_msgside

function
c_msgside(arg0)
{
c_cmd("msgside", arg0, 0, 0, 0);
}
("top");
89
    
c_speaker
c_speaker

function
c_speaker(arg0)
{
c_cmd("speaker", arg0, 0, 0, 0);
}
("susie");
90
    
c_msgsetloc
c_msgsetloc

function
c_msgsetloc(arg0, arg1, arg2)
{ var msg_index = arg0; var english = arg1; var localized_string_id = arg2; var str = english; if (!is_english()) str =
scr_84_get_lang_string(localized_string_id);
c_msgset(msg_index, str);
}
(0,
Face 6* ...Delay 11 Did you just hear something?Wait for input
"\\E6* ..^1. Did you just hear something?/", "obj_dw_church_secretpiano_slash_Step_0_gml_128_0"
);
91
    
c_facenext
c_facenext

function
c_facenext(arg0, arg1)
{
c_cmd("msgfacenext", arg0, arg1, 0, 0);
}
("ralsei", "K");
92
    
c_msgnextloc
c_msgnextloc

function
c_msgnextloc(arg0, arg1)
{ var str = arg0; var localized_string_id = arg1; if (!is_english()) str =
scr_84_get_lang_string(localized_string_id);
c_msgnext(str);
}
(
Face K* It sounded a bit like a fireplace opening up.Wait for input
"\\EK* It sounded a bit like a fireplace opening up./", "obj_dw_church_secretpiano_slash_Step_0_gml_130_0"
);
93
    
c_facenext
c_facenext

function
c_facenext(arg0, arg1)
{
c_cmd("msgfacenext", arg0, arg1, 0, 0);
}
("susie", 20);
94
    
c_msgnextloc
c_msgnextloc

function
c_msgnextloc(arg0, arg1)
{ var str = arg0; var localized_string_id = arg1; if (!is_english()) str =
scr_84_get_lang_string(localized_string_id);
c_msgnext(str);
}
(
Face K* Dude,Delay 11 too specific. But yeah.Wait for inputClose Message
"\\EK* Dude^1, too specific. But yeah./%", "obj_dw_church_secretpiano_slash_Step_0_gml_132_0"
);
95
    
c_talk
c_talk

function
c_talk()
{
c_cmd("talk", 0, 0, 0, 0);
}
();
96
    
c_wait_box
c_wait_box

function
c_wait_box(arg0)
{
c_cmd("waitbox", arg0, 0, 0, 0);
}
(2);
97
    
c_sel
c_sel

function
c_sel(arg0)
{
c_cmd("select", arg0, 0, 0, 0);
}
(su);
98
    
c_halt
c_halt

function
c_halt()
{
c_cmd("halt", 0, 0, 0, 0);
}
();
99
    
c_sel
c_sel

function
c_sel(arg0)
{
c_cmd("select", arg0, 0, 0, 0);
}
(ra);
100
    
c_sprite
c_sprite

function
c_sprite(arg0)
{
c_cmd("sprite", arg0, 0, 0, 0);
}
(spr_ralsei_turn_right_subtle);
101
    
c_wait_box
c_wait_box

function
c_wait_box(arg0)
{
c_cmd("waitbox", arg0, 0, 0, 0);
}
(4);
102
    
c_sel
c_sel

function
c_sel(arg0)
{
c_cmd("select", arg0, 0, 0, 0);
}
(su);
103
    
c_autowalk
c_autowalk

function
c_autowalk(arg0)
{
c_cmd("autowalk", arg0, 0, 0, 0);
}
(1);
104
    
c_facing
c_facing

function
c_facing(arg0)
{
c_cmd("facing", arg0, 0, 0, 0);
}
("u");
105
    
c_addxy
c_addxy

function
c_addxy(arg0, arg1)
{
c_cmd("addxy", arg0, arg1, 0, 0);
}
(0, 6);
106
    
c_sel
c_sel

function
c_sel(arg0)
{
c_cmd("select", arg0, 0, 0, 0);
}
(ra);
107
    
c_facing
c_facing

function
c_facing(arg0)
{
c_cmd("facing", arg0, 0, 0, 0);
}
("u");
108
    
c_wait_talk
c_wait_talk

function
c_wait_talk()
{
c_cmd("waitdialoguer", 0, 0, 0, 0);
}
();
109
    
c_wait
c_wait

function
c_wait(arg0)
{
c_cmd("wait", arg0, 0, 0, 0);
}
(30);
110
    
c_sel
c_sel

function
c_sel(arg0)
{
c_cmd("select", arg0, 0, 0, 0);
}
(kr);
111
    
c_facing
c_facing

function
c_facing(arg0)
{
c_cmd("facing", arg0, 0, 0, 0);
}
("d");
112
    
c_waitcustom
c_waitcustom

function
c_waitcustom()
{
c_cmd("waitcustom", 0, 0, 0, 0);
}
();
113
}
114
if (con == 55 && customcon == 1)
115
{
116
    con = 58;
117
    with (obj_caterpillarchara)
118
        visible = 1;
119
}
120
if (con == 58 && customcon == 1)
121
{
122
    con = 60;
123
    
c_waitcustom_end
c_waitcustom_end

function
c_waitcustom_end()
{ with (obj_cutscene_master) { cs_wait_custom = 0; waiting = 0; } }
();
124
    
c_actortokris
c_actortokris

function
c_actortokris()
{
c_cmd("actortokris", 0, 0, 0, 0);
}
();
125
    
c_actortocaterpillar
c_actortocaterpillar

function
c_actortocaterpillar()
{
c_cmd("actortocaterpillar", 0, 0, 0, 0);
}
();
126
    
c_terminatekillactors
c_terminatekillactors

function
c_terminatekillactors()
{
c_cmd("terminatekillactors", 0, 0, 0, 0);
}
();
127
}
128
if (con == 60 && !i_ex(obj_cutscene_master))
129
{
130
    con = -1;
131
    global.interact = 0;
132
    
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);
}
(1547, 1);
133
    
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);
}
(851, 1);
134
    with (obj_church_secretpiano_playable)
135
        cantuse = true;
136
    global.currentroom = room;
137
    
scr_tempsave
scr_tempsave

function
scr_tempsave()
{ filechoicebk2 = global.filechoice; global.filechoice = 9;
scr_saveprocess(global.filechoice);
global.filechoice = filechoicebk2; }
();
138
}
139
with (plaque)
140
{
141
    if (myinteract == 3)
142
    {
143
        global.interact = 1;
144
        
scr_speaker
scr_speaker

function
scr_speaker(arg0)
{ _speaker = arg0; global.typer = 5; if (global.darkzone == 1) global.typer = 6; if (global.fighting == 1) global.typer = 4; global.fc = 0; global.fe = 0; if (_speaker == "silent" && global.darkzone == 0) global.typer = 2; if (_speaker == "silent" && global.darkzone == 1) global.typer = 36; if (_speaker == "balloon" || _speaker == "enemy") global.typer = 50; if (_speaker == "sans") { global.typer = 14; global.fc = 6; } if (_speaker == "undyne" || _speaker == "und") { global.typer = 17; global.fc = 9; } if (_speaker == "temmie" || _speaker == "tem") global.typer = 21; if (_speaker == "jevil") global.typer = 35; if (_speaker == "catti") global.fc = 13; if (_speaker == "jockington" || _speaker == "joc") global.fc = 14; if (_speaker == "catty" || _speaker == "caddy") global.fc = 16; if (_speaker == "bratty" || _speaker == "bra") global.fc = 17; if (_speaker == "rouxls" || _speaker == "rou") global.fc = 18; if (_speaker == "burgerpants" || _speaker == "bur") global.fc = 19; if (_speaker == "spamton") { if (global.fighting == 0) global.typer = 66; else global.typer = 68; } if (_speaker == "sneo") global.typer = 67; if (_speaker == "gerson" || _speaker == "ger" || _speaker == "gers") global.typer = 85; if (_speaker == "susie" || _speaker == "sus") { global.fc = 1; global.typer = 10; if (global.darkzone == 1) { global.typer = 30; if (global.fighting == 1) global.typer = 47; } } if (_speaker == "ralsei" || _speaker == "ral") { global.fc = 2; global.typer = 31; if (global.fighting == 1) global.typer = 45; if (global.flag[30 ralsei_hat_state] == 1) global.typer = 6; } if (_speaker == "noelle" || _speaker == "noe") { global.fc = 3; if (global.darkzone == 0) global.typer = 12; else global.typer = 56; if (global.fighting == 1) global.typer = 59; } if (_speaker == "toriel" || _speaker == "tor") { global.fc = 4; global.typer = 7; } if (_speaker == "asgore" || _speaker == "asg") { global.fc = 10; global.typer = 18; } if (_speaker == "king" || _speaker == "kin") { global.fc = 20; global.typer = 33; if (global.chapter == 1) { if (global.plot < 235) global.typer = 36; ...
("no_name");
145
        msgsetloc(0, 
* Melodies three,Delay 11 there be.
* Two in the southern towers
* One where gold strikes water.Wait for inputClose Message
"* Melodies three^1, there be.&* Two in the southern towers&* One where gold strikes water./%", "obj_dw_church_secretpiano_slash_Step_0_gml_209_0"
);
146
        d_make();
147
        myinteract = 999;
148
        talked++;
149
    }
150
    if (myinteract == 999 && !d_ex())
151
    {
152
        myinteract = 0;
153
        marker.image_index = 0;
154
        global.interact = 0;
155
    }
156
}