Deltarune (Chapter 3) script viewer

← back to main script listing

gml_Object_obj_glowtilepuzz_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
    with (block[wonamt])
11
        instance_destroy();
12
    with (spike1[wonamt])
13
        image_index = 1;
14
    with (spike2[wonamt])
15
        image_index = 1;
16
    wonamt += 1;
17
    snd_play(snd_break1);
18
    funbuffer = 7;
19
    if (wonamt == wonmax)
20
    {
21
        snd_play_x(snd_crowd_cheer_single, 0.25, 1);
22
        snd_play(snd_break2);
23
        if (global.plot < plotamt)
24
            global.plot = plotamt;
25
        active = 2;
26
        sprite_index = spr_hourglass_switch_off;
27
        funbuffer = -1;
28
        with (obj_glowtile)
29
        {
30
            active = 0;
31
            stepped = 0;
32
            stepbuffer = -1;
33
            sprite_index = spr_glowtile_off;
34
        }
35
    }
36
}
37
if (funbuffer == 4)
38
{
39
    with (obj_glowtile)
40
    {
41
        active = 0;
42
        stepped = 0;
43
        stepbuffer = -1;
44
        sprite_index = spr_glowtile_off;
45
    }
46
}
47
if (funbuffer == 1)
48
    event_user(2);
49
if (stepnoise == 1)
50
{
51
    snd_play(snd_step1);
52
    stepnoise = 0;
53
}
54
if (active == 1)
55
{
56
    failtimer += 1;
57
    image_index = failtimer / (failmax / 8);
58
    if (obj_mainchara.run == 1)
59
        run_count++;
60
    if (failtimer >= failmax)
61
    {
62
        run_check = 
scr_flag_get
scr_flag_get

function
scr_flag_get(arg0)
{ var flag_value = global.flag[arg0]; return flag_value; }
(1259) == 0;
63
        active = 0;
64
        sprite_index = spr_hourglass_switch_off;
65
        snd_play(snd_noise);
66
        failamt += 1;
67
        with (obj_glowtile)
68
        {
69
            active = 0;
70
            stepped = 0;
71
            stepbuffer = -1;
72
            sprite_index = spr_glowtile_off;
73
        }
74
    }
75
}
76
if (delayfacing == 1)
77
{
78
    delayfacing = 0;
79
    global.facing = 0;
80
}
81
if (run_check)
82
{
83
    if (run_count <= 5 && global.interact == 0)
84
    {
85
        run_con = 1;
86
        global.interact = 1;
87
        scr_delay_var("run_con", 2, 30);
88
    }
89
    if (run_con == 2)
90
    {
91
        run_con = 3;
92
        
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 == "tenna") { global.typer = 80; if (global.fighting == 1) global.typer = 81; } 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; ...
("ralsei");
93
        msgsetsubloc(0, "\\E2* (Remember you can hold ~1 to run^1, Kris...!)/%", 
scr_get_input_name
scr_get_input_name

function
scr_get_input_name(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 == gp_padu) return "\\*W "; if (_control == gp_padd) return "\\*S "; 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), "obj_glowtilepuzz_slash_Step_0_gml_112_0");
94
        var d = d_make();
95
    }
96
    if (run_con == 3 && !d_ex())
97
    {
98
        run_con = -1;
99
        global.interact = 0;
100
        run_check = false;
101
        
scr_flag_set
scr_flag_set

function
scr_flag_set(arg0, arg1)
{ global.flag[arg0] = arg1; }
(1259, 1);
102
    }
103
}