Deltarune (Chapter 3) script viewer

← back to main script listing

gml_Object_obj_b3belevatorroom_Step_0

(view raw script w/o annotations or w/e)
1
scr_board_populatevars
scr_board_populatevars

function
scr_board_populatevars()
{ if (!variable_instance_exists(id, "kris")) kris = 0; if (!variable_instance_exists(id, "susie")) susie = 0; if (!variable_instance_exists(id, "ralsei")) ralsei = 0; if (kris == 0) { with (obj_mainchara_board) { if (name == "kris") other.kris = id; } } if (ralsei == 0) { with (obj_mainchara_board) { if (name == "ralsei") other.ralsei = id; } } if (susie == 0) { with (obj_mainchara_board) { if (name == "susie") other.susie = id; } } }
();
2
scr_gameshow_populatevars
scr_gameshow_populatevars

function
scr_gameshow_populatevars()
{ if (!variable_instance_exists(id, "kr_real")) kr_real = 0; if (!variable_instance_exists(id, "su_real")) su_real = 0; if (!variable_instance_exists(id, "ra_real")) ra_real = 0; if (!variable_instance_exists(id, "tenna")) tenna = 0; if (kr_real == 0) { with (obj_mainchara) other.kr_real = id; } if (su_real == 0) { with (obj_caterpillarchara) { if (name == "susie") other.su_real = id; } } if (ra_real == 0) { with (obj_caterpillarchara) { if (name == "ralsei") other.ra_real = id; } } if (tenna == 0) { with (obj_actor_tenna) other.tenna = id; } }
();
3
if (active == 1)
4
{
5
    if (con == 0 && obj_board_camera.con == 0)
6
    {
7
        kris.controlled = 0;
8
        susie.controlled = 1;
9
        ralsei.follow = 0;
10
        con = 1;
11
    }
12
    if (con == 1)
13
    {
14
        timer++;
15
        if (timer == 5)
16
            
scr_play_recording
scr_play_recording

function
scr_play_recording(arg0, arg1)
{ with (obj_mainchara_board) { if (name == arg0) { susierecordcon = 2; susierecordcount = 0; susierecordstring = arg1; susierecordsave = false; } } }
("kris", "0L0L0L0L0L0L0L0L0L0L0L0LL0L0L0L0L0L0L0L0L0L0L0L0L0L0L0L0L0L0L0L0L0L0L0L0L0L0L0L0L0L0L0L0U0U0U0U0U0U0U0U0U0U");
17
        if (timer == 30)
18
        {
19
            
scr_play_recording
scr_play_recording

function
scr_play_recording(arg0, arg1)
{ with (obj_mainchara_board) { if (name == arg0) { susierecordcon = 2; susierecordcount = 0; susierecordstring = arg1; susierecordsave = false; } } }
("ralsei", "0L0L0L0L0L0L0L0L0L0L0L0LL0L0L0L0L0L0L0L0L0L0L0L0L0L0L0L0L0L0L0U0U");
20
            timer = 0;
21
            con++;
22
        }
23
    }
24
    if (con == 2)
25
    {
26
        if (
scr_board_checklocation
scr_board_checklocation

function
scr_board_checklocation()
{ var _name = argument0; var _xloc = argument1; var _yloc = argument2; if (_xloc < 12) _xloc = board_tilex(_xloc); if (_yloc < 12) _yloc = board_tiley(_yloc); var _tol = 4; if (argument_count == 4) _tol = argument3; var targ = 0; with (obj_mainchara_board) { if (name == _name) targ = id; } if (!i_ex(targ)) { debug_message("target does not exist"); return false; } if (abs(targ.x - _xloc) < _tol && abs(targ.y - _yloc) < _tol) return true; }
("kris", 308, 156, 12))
27
        {
28
            timer++;
29
            if (timer == 15)
30
            {
31
                global.interact = 1;
32
                
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; ...
("no_name");
33
                msgsetloc(0, 
THE MOONCLOUD KEY CARD WAS USED.Wait for inputClose Message
"THE \\cYMOONCLOUD KEY CARD\\cW WAS USED./%", "obj_b3belevatorroom_slash_Step_0_gml_43_0"
);
34
                bw_make();
35
                con++;
36
            }
37
        }
38
    }
39
    if (con == 3)
40
    {
41
        var proceed = false;
42
        timer = 0;
43
        if (i_ex(obj_board_writer))
44
        {
45
            if (obj_board_writer.halt == true)
46
                proceed = true;
47
        }
48
        if (!bw_ex())
49
            proceed = true;
50
        if (proceed)
51
        {
52
            con = 4;
53
            tenna.bounce = 1;
54
            var tetalk = stringsetloc(
What the heck?
"What the heck?", "obj_b3belevatorroom_slash_Step_0_gml_65_0"
);
55
            
scr_couchtalk
scr_couchtalk

function scr_couchclear(arg0) { with (obj_couchwriter) { if (speaker == arg0) instance_destroy(); } } function
scr_couchtalk(arg0, arg1)
{ var ix = -1; var iy = -1; if (argument_count >= 6) { ix = argument4; iy = argument5; } var couchtext = instance_create_depth(ix, iy, 5000, obj_couchwriter); couchtext.mystring = arg0; couchtext.speaker = arg1; if (argument_count >= 3) couchtext.cleartext = argument2; if (argument_count >= 4) couchtext.drawtime = argument3; if (argument_count >= 7) couchtext.customsnd = argument6; if (argument_count >= 8) couchtext.customcolor = argument7; if (argument_count >= 9) couchtext.talkrate = argument8; if (argument_count >= 10) couchtext.talklength = argument9; return couchtext; }
(tetalk, "tenna", 2, 80);
56
        }
57
    }
58
    if (con == 4 && !bw_ex())
59
    {
60
        timer++;
61
        if (timer == 1)
62
        {
63
            
scr_board_gridreset
scr_board_gridreset

function
scr_board_gridreset()
{ with (obj_board_controller) grid_reset = true; }
();
64
            global.interact = 0;
65
            safe_delete(blocker);
66
            blackmarker = 
scr_board_marker
scr_board_marker

function
scr_board_marker()
{ var _thismarker = instance_create(argument0, argument1, obj_board_marker); _thismarker.sprite_index = argument2; _thismarker.image_xscale = 2; _thismarker.image_yscale = 2; if (argument_count >= 4) _thismarker.image_speed = argument3; if (argument_count >= 5) { if (argument4 != -1) _thismarker.depth = argument4; } if (argument_count >= 6) _thismarker.image_xscale = argument5; if (argument_count >= 6) _thismarker.image_yscale = argument5; if (argument_count >= 7) _thismarker.animateonce = argument6; return _thismarker; }
(1442, 1632, spr_pxwhite, 0, 999999, 60);
67
            with (blackmarker)
68
                setxy_board(x, y);
69
            blackmarker.image_blend = c_black;
70
            snd_play(snd_board_door_close);
71
        }
72
        if (timer == 45)
73
            
scr_play_recording
scr_play_recording

function
scr_play_recording(arg0, arg1)
{ with (obj_mainchara_board) { if (name == arg0) { susierecordcon = 2; susierecordcount = 0; susierecordstring = arg1; susierecordsave = false; } } }
("kris", "0U0U0U0U0U0U0U0U0U0U0U0U0U0U0U0U0U0U0U0U0U0U0U0U0U0U0U0U0U0U");
74
        if (timer == 45)
75
        {
76
            
scr_play_recording
scr_play_recording

function
scr_play_recording(arg0, arg1)
{ with (obj_mainchara_board) { if (name == arg0) { susierecordcon = 2; susierecordcount = 0; susierecordstring = arg1; susierecordsave = false; } } }
("ralsei", "0L0L0L0L0L0L0L0L0L0L0L0L0L0U0U0U0U0U0U0U0U0U0U0U0U0U0U0U0U0U0U0U0U0U0U0U0U0U0U0U0U0U0U");
77
            con++;
78
            timer = 0;
79
        }
80
    }
81
    if (con == 5)
82
    {
83
        if (
scr_board_checklocation
scr_board_checklocation

function
scr_board_checklocation()
{ var _name = argument0; var _xloc = argument1; var _yloc = argument2; if (_xloc < 12) _xloc = board_tilex(_xloc); if (_yloc < 12) _yloc = board_tiley(_yloc); var _tol = 4; if (argument_count == 4) _tol = argument3; var targ = 0; with (obj_mainchara_board) { if (name == _name) targ = id; } if (!i_ex(targ)) { debug_message("target does not exist"); return false; } if (abs(targ.x - _xloc) < _tol && abs(targ.y - _yloc) < _tol) return true; }
("kris", 308, board_tiley(0), 10))
84
        {
85
            timer++;
86
            if (timer == 6)
87
            {
88
                with (obj_mainchara_board)
89
                    controlled = 0;
90
                kris.controlled = 1;
91
                global.interact = 1;
92
                obj_board_camera.shift = "up";
93
                tenna.bounce = 1;
94
                var tetalk = stringsetloc(
The contestants, WOW! They have the ELEVATOR KEY CARD!
"The contestants, WOW! They have the ELEVATOR KEY CARD!", "obj_b3belevatorroom_slash_Step_0_gml_108_0"
);
95
                
scr_couchtalk
scr_couchtalk

function scr_couchclear(arg0) { with (obj_couchwriter) { if (speaker == arg0) instance_destroy(); } } function
scr_couchtalk(arg0, arg1)
{ var ix = -1; var iy = -1; if (argument_count >= 6) { ix = argument4; iy = argument5; } var couchtext = instance_create_depth(ix, iy, 5000, obj_couchwriter); couchtext.mystring = arg0; couchtext.speaker = arg1; if (argument_count >= 3) couchtext.cleartext = argument2; if (argument_count >= 4) couchtext.drawtime = argument3; if (argument_count >= 7) couchtext.customsnd = argument6; if (argument_count >= 8) couchtext.customcolor = argument7; if (argument_count >= 9) couchtext.talkrate = argument8; if (argument_count >= 10) couchtext.talklength = argument9; return couchtext; }
(tetalk, "tenna", 2, 80);
96
            }
97
        }
98
    }
99
}
100
else
101
{
102
}