Deltarune script viewer

← back to main script listing

gml_Object_obj_glowtilepuzz_ch1_Step_0

(view raw script w/o annotations or w/e)
1
curtotal = 0;
2
funbuffer -= 1;
3
for (i = 0; i < tiletotal; i += 1)
4
{
5
    if (tileid[i].stepped == 1)
6
        curtotal += 1;
7
}
8
if (curtotal == funtotal && funbuffer < -1)
9
{
10
    if (room == room_field_puzzle1_ch1)
11
    {
12
        with (block[wonamt])
13
            instance_destroy();
14
        with (spike1[wonamt])
15
            image_index = 1;
16
        with (spike2[wonamt])
17
            image_index = 1;
18
    }
19
    wonamt += 1;
20
    snd_play_ch1(snd_break1_ch1);
21
    funbuffer = 7;
22
    if (wonamt == wonmax)
23
    {
24
        if (room == room_field_puzzle2_ch1)
25
            shakecon = 1;
26
        if (global.plot < plotamt)
27
            global.plot = plotamt;
28
        active = 2;
29
        sprite_index = spr_hourglass_switch_off_ch1;
30
        funbuffer = -1;
31
        with (obj_glowtile_ch1)
32
        {
33
            active = 0;
34
            stepped = 0;
35
            stepbuffer = -1;
36
            sprite_index = spr_glowtile_off_ch1;
37
        }
38
    }
39
}
40
if (funbuffer == 4)
41
{
42
    with (obj_glowtile_ch1)
43
    {
44
        active = 0;
45
        stepped = 0;
46
        stepbuffer = -1;
47
        sprite_index = spr_glowtile_off_ch1;
48
    }
49
}
50
if (funbuffer == 1)
51
    event_user(2);
52
if (stepnoise == 1)
53
{
54
    snd_play_ch1(snd_step1_ch1);
55
    stepnoise = 0;
56
}
57
if (active == 1)
58
{
59
    failtimer += 1;
60
    image_index = failtimer / (failmax / 8);
61
    if (failtimer >= failmax)
62
    {
63
        active = 0;
64
        sprite_index = spr_hourglass_switch_off_ch1;
65
        snd_play_ch1(snd_noise_ch1);
66
        failamt += 1;
67
        if (failamt >= 3 && talked == 0 && global.interact == 0 && obj_darkcontroller_ch1.atalk == 0 && room == room_field_puzzle1_ch1)
68
        {
69
            talked = 1;
70
            global.interact = 1;
71
            global.fc = 2;
72
            global.typer = 31;
73
            global.fe = 1;
74
            global.msg[0] = 
* Kris,Delay 11 um,Delay 11 you didn't forget,Delay 11 did you...?Wait for input
scr_84_get_lang_string_ch1
scr_84_get_lang_string_ch1

function scr_84_get_lang_string_ch1(arg0) { return ds_map_find_value(global.lang_map, arg0); }
("obj_glowtilepuzz_slash_Step_0_gml_77_0")
;
75
            global.msg[1] = 
* That you can run by holding
scr_84_get_lang_string_ch1
scr_84_get_lang_string_ch1

function scr_84_get_lang_string_ch1(arg0) { return ds_map_find_value(global.lang_map, arg0); }
("obj_glowtilepuzz_slash_Step_0_gml_78_0")
+ scr_get_input_name_ch1
scr_get_input_name_ch1

function scr_get_input_name_ch1(arg0) { var _control = "[?]"; if (global.is_console || obj_gamecontroller.gamepad_active) { _control = global.input_g[arg0]; if (_control == gp_padr) return "\\*D "; if (_control == gp_padl) return "\\*A "; if (_control == global.button0) return "\\*Z "; if (_control == global.button1) return "\\*X "; if (_control == global.button2) return "\\*C "; } var left_bracket = (global.lang == "en") ? "[" : "["; var right_bracket = (global.lang == "en") ? "]" : "]"; _control = left_bracket + global.asc_def[global.input_k[arg0]] + right_bracket; if (!is_string(_control)) _control = "[?]"; else return _control; }
(5) +
?Wait for inputClose Message
scr_84_get_lang_string_ch1
scr_84_get_lang_string_ch1

function scr_84_get_lang_string_ch1(arg0) { return ds_map_find_value(global.lang_map, arg0); }
("obj_glowtilepuzz_slash_Step_0_gml_78_1")
;
76
            instance_create_ch1(0, 0, obj_dialoguer_ch1);
77
        }
78
        if (failamt >= 3 && talked == 0 && global.interact == 0 && room == room_field_puzzle2_ch1)
79
        {
80
            talked = 1;
81
            global.interact = 1;
82
            global.fc = 2;
83
            global.typer = 31;
84
            global.fe = 1;
85
            if (!scr_havechar_ch1
scr_havechar_ch1

function scr_havechar_ch1(arg0) { _rreturn = 0; if (global.char[0] == arg0) _rreturn = 1; if (global.char[1] == arg0) _rreturn = 1; if (global.char[2] == arg0) _rreturn = 1; return _rreturn; }
(2))
86
            {
87
                global.msg[0] = 
* Ummm,Delay 11 Kris,Delay 11 I think we might be missing something.Wait for input
scr_84_get_lang_string_ch1
scr_84_get_lang_string_ch1

function scr_84_get_lang_string_ch1(arg0) { return ds_map_find_value(global.lang_map, arg0); }
("obj_glowtilepuzz_slash_Step_0_gml_91_0")
;
88
                global.msg[1] = 
\E8* Maybe we should try going to the next room?Wait for inputClose Message
scr_84_get_lang_string_ch1
scr_84_get_lang_string_ch1

function scr_84_get_lang_string_ch1(arg0) { return ds_map_find_value(global.lang_map, arg0); }
("obj_glowtilepuzz_slash_Step_0_gml_92_0")
;
89
            }
90
            if (scr_havechar_ch1
scr_havechar_ch1

function scr_havechar_ch1(arg0) { _rreturn = 0; if (global.char[0] == arg0) _rreturn = 1; if (global.char[1] == arg0) _rreturn = 1; if (global.char[2] == arg0) _rreturn = 1; return _rreturn; }
(2) && obj_darkcontroller_ch1.atalk == 0)
91
            {
92
                global.msg[0] = 
* Hey Kris,Delay 11 if you need help with a puzzle...Wait for input
scr_84_get_lang_string_ch1
scr_84_get_lang_string_ch1

function scr_84_get_lang_string_ch1(arg0) { return ds_map_find_value(global.lang_map, arg0); }
("obj_glowtilepuzz_slash_Step_0_gml_98_0")
;
93
                global.msg[1] = 
\E8* Feel free to ask me anytime,Delay 11 OK?Wait for input
scr_84_get_lang_string_ch1
scr_84_get_lang_string_ch1

function scr_84_get_lang_string_ch1(arg0) { return ds_map_find_value(global.lang_map, arg0); }
("obj_glowtilepuzz_slash_Step_0_gml_99_0")
;
94
                scr_susface_ch1
scr_susface_ch1

function scr_susface_ch1(arg0, arg1) { global.msg[arg0] = scr_84_get_subst_string_ch1(
\TX \F0 \E~1 \FS \TS Close Message
scr_84_get_lang_string_ch1("scr_susface_slash_scr_susface_gml_1_0")
, string(arg1)); }
(2, 2);
95
                global.msg[3] = 
* And if you need help from me...Delay 11
* You're screwed.Wait for inputClose Message
scr_84_get_lang_string_ch1
scr_84_get_lang_string_ch1

function scr_84_get_lang_string_ch1(arg0) { return ds_map_find_value(global.lang_map, arg0); }
("obj_glowtilepuzz_slash_Step_0_gml_101_0")
;
96
            }
97
            if (scr_havechar_ch1
scr_havechar_ch1

function scr_havechar_ch1(arg0) { _rreturn = 0; if (global.char[0] == arg0) _rreturn = 1; if (global.char[1] == arg0) _rreturn = 1; if (global.char[2] == arg0) _rreturn = 1; return _rreturn; }
(2) && obj_darkcontroller_ch1.atalk == 1)
98
            {
99
                global.fc = 1;
100
                global.fe = 0;
101
                global.typer = 30;
102
                global.msg[0] = 
* Oh my god.Delay 11
* AGAIN?Wait for input
scr_84_get_lang_string_ch1
scr_84_get_lang_string_ch1

function scr_84_get_lang_string_ch1(arg0) { return ds_map_find_value(global.lang_map, arg0); }
("obj_glowtilepuzz_slash_Step_0_gml_110_0")
;
103
                global.msg[1] = 
* WHY is Kris the leader of the party again?Wait for input
scr_84_get_lang_string_ch1
scr_84_get_lang_string_ch1

function scr_84_get_lang_string_ch1(arg0) { return ds_map_find_value(global.lang_map, arg0); }
("obj_glowtilepuzz_slash_Step_0_gml_111_0")
;
104
                scr_ralface_ch1
scr_ralface_ch1

function scr_ralface_ch1(arg0, arg1) { global.msg[arg0] = scr_84_get_subst_string_ch1(
\TX \F0 \E~1 \FR \TR Close Message
scr_84_get_lang_string_ch1("scr_ralface_slash_scr_ralface_gml_1_0")
, string(arg1)); }
(2, 8);
105
                global.msg[3] = 
* Susie! K-Kris is doing their best to use
scr_84_get_lang_string_ch1
scr_84_get_lang_string_ch1

function scr_84_get_lang_string_ch1(arg0) { return ds_map_find_value(global.lang_map, arg0); }
("obj_glowtilepuzz_slash_Step_0_gml_113_0")
+ scr_get_input_name_ch1
scr_get_input_name_ch1

function scr_get_input_name_ch1(arg0) { var _control = "[?]"; if (global.is_console || obj_gamecontroller.gamepad_active) { _control = global.input_g[arg0]; if (_control == gp_padr) return "\\*D "; if (_control == gp_padl) return "\\*A "; if (_control == global.button0) return "\\*Z "; if (_control == global.button1) return "\\*X "; if (_control == global.button2) return "\\*C "; } var left_bracket = (global.lang == "en") ? "[" : "["; var right_bracket = (global.lang == "en") ? "]" : "]"; _control = left_bracket + global.asc_def[global.input_k[arg0]] + right_bracket; if (!is_string(_control)) _control = "[?]"; else return _control; }
(5) +
to RUN!Wait for inputClose Message
scr_84_get_lang_string_ch1
scr_84_get_lang_string_ch1

function scr_84_get_lang_string_ch1(arg0) { return ds_map_find_value(global.lang_map, arg0); }
("obj_glowtilepuzz_slash_Step_0_gml_113_1")
;
106
            }
107
            instance_create_ch1(0, 0, obj_dialoguer_ch1);
108
        }
109
        with (obj_glowtile_ch1)
110
        {
111
            active = 0;
112
            stepped = 0;
113
            stepbuffer = -1;
114
            sprite_index = spr_glowtile_off_ch1;
115
        }
116
    }
117
}
118
if (talked == 1 && d_ex_ch1() == 0)
119
{
120
    talked = 2;
121
    global.interact = 0;
122
}
123
if (shakecon == 1 && global.interact == 0)
124
{
125
    global.interact = 1;
126
    snd_play_ch1(snd_locker_ch1);
127
    instance_create_ch1(0, 0, obj_shake_ch1);
128
    shakecon = 2;
129
}
130
if (shakecon == 2 && !instance_exists(obj_shake_ch1))
131
{
132
    global.fc = 0;
133
    global.typer = 6;
134
    global.msg[0] = 
* (Sounded like a door opened.)Wait for inputClose Message
scr_84_get_lang_string_ch1
scr_84_get_lang_string_ch1

function scr_84_get_lang_string_ch1(arg0) { return ds_map_find_value(global.lang_map, arg0); }
("obj_glowtilepuzz_slash_Step_0_gml_148_0")
;
135
    instance_create_ch1(0, 0, obj_dialoguer_ch1);
136
    shakecon = 3;
137
}
138
if (shakecon == 3 && d_ex_ch1() == 0)
139
{
140
    global.interact = 0;
141
    shakecon = 4;
142
}