Deltarune (Chapter 3) script viewer

← back to main script listing

gml_Object_obj_b2pippinsisland_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 (pip1 == 0)
4
{
5
    with (obj_b2pippinsislandnpc)
6
    {
7
        if (num == 0)
8
            other.pip1 = id;
9
    }
10
}
11
if (pip2 == 0)
12
{
13
    with (obj_b2pippinsislandnpc)
14
    {
15
        if (num == 1)
16
            other.pip2 = id;
17
    }
18
}
19
if (active == 1)
20
{
21
    if (con == 0 && obj_board_camera.con == 0)
22
    {
23
        if (boattalk == 0)
24
        {
25
            boattalk = 1;
26
            if (tennahere())
27
            {
28
                with (obj_actor_tenna)
29
                    bounce = 1;
30
                var tetalk = stringsetloc(
... HEY, you two aren't supposed to be here!
"... HEY, you two aren't supposed to be here!", "obj_b2pippinsisland_slash_Step_0_gml_26_0"
);
31
                
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, 70);
32
            }
33
        }
34
        with (obj_b2pippinsislandnpc)
35
        {
36
            if (myinteract >= 3)
37
            {
38
                global.interact = 1;
39
                obj_b2pippinsisland.con++;
40
            }
41
        }
42
    }
43
    if (con == 1)
44
    {
45
        if (tennahere())
46
        {
47
            
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");
48
            msgsetloc(0, 
HEY,Delay 11 KRIS,Delay 11 WANT TO PLAY MONEY MAKING GAME?Wait for inputClose Message
"HEY^1, KRIS^1, WANT TO PLAY MONEY MAKING GAME?/%", "obj_b2pippinsisland_slash_Step_0_gml_35_0"
);
49
            b = bw_make();
50
            con = 2;
51
        }
52
        else
53
        {
54
            
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");
55
            msgsetloc(0, 
HEY KRIS,Delay 11 WANT TO PLAY MONEY --Wait for input
"HEY KRIS^1, WANT TO PLAY MONEY --/", "obj_b2pippinsisland_slash_Step_0_gml_42_0"
);
56
            msgnextloc(
WAIT,Delay 11 WHERE'S THE BOSS?Wait for input
"WAIT^1, WHERE'S THE BOSS?/", "obj_b2pippinsisland_slash_Step_0_gml_43_0"
);
57
            msgnextloc(
TIME TO TAKE AN UNSANCTIONED BREAK!Wait for inputClose Message
"TIME TO TAKE AN UNSANCTIONED BREAK!/%", "obj_b2pippinsisland_slash_Step_0_gml_44_0"
);
58
            bw_make();
59
            con = 40;
60
        }
61
    }
62
    if (con == 2)
63
    {
64
        var _trig = 0;
65
        with (obj_board_writer)
66
        {
67
            with (writer)
68
            {
69
                if (reachedend)
70
                    _trig = 1;
71
            }
72
        }
73
        if (!instance_exists(obj_writer))
74
        {
75
            failsafe++;
76
            if (failsafe >= 15)
77
                _trig = 1;
78
        }
79
        if (_trig)
80
        {
81
            with (obj_actor_tenna)
82
                bounce = 1;
83
            var tetalk = stringsetloc(
What the ---
"What the ---", "obj_b2pippinsisland_slash_Step_0_gml_56_0"
);
84
            
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, 9999);
85
            con = 3;
86
            buff = 3;
87
        }
88
    }
89
    if (con == 3)
90
    {
91
        buff--;
92
        if (buff <= 0)
93
        {
94
            if (!bw_ex() || button1_p() || button3_h())
95
            {
96
                with (obj_board_writer)
97
                    instance_destroy();
98
                with (obj_couchwriter)
99
                    instance_destroy();
100
                with (obj_actor_tenna)
101
                    bounce = 1;
102
                var tetalk = stringsetloc(
Who said you could do that on the job!?
"Who said you could do that on the job!?", "obj_b2pippinsisland_slash_Step_0_gml_75_0"
);
103
                
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, 120);
104
                con = 4;
105
                buff = 3;
106
            }
107
        }
108
    }
109
    if (con == 4)
110
    {
111
        buff--;
112
        if (buff <= 0)
113
        {
114
            if (!i_ex(obj_couchwriter) || button1_p() || button3_h())
115
            {
116
                with (obj_couchwriter)
117
                    instance_destroy();
118
                
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");
119
                msgsetloc(0, 
UH OH,Delay 11 GIG'S UP!Wait for inputClose Message
"UH OH^1, GIG'S UP!/%", "obj_b2pippinsisland_slash_Step_0_gml_93_0"
);
120
                bw_make();
121
                con = 5;
122
            }
123
        }
124
    }
125
    if (con == 5 && !bw_ex())
126
    {
127
        timer++;
128
        if (timer == 5)
129
        {
130
            snd_play_x(snd_jump, 0.5, 1.3);
131
            snd_play_x(snd_jump, 0.5, 1.1);
132
            with (pip1)
133
                
scr_jump_to_point
scr_jump_to_point

function
scr_jump_to_point(arg0, arg1, arg2, arg3, arg4 = 0)
{ var ___jump =
scr_jump_to_point_sprite(arg0, arg1, arg2, arg3, 0, 0);
with (___jump) { trackalpha = arg4; trackblend = arg4; trackindex = arg4; tracksprite = arg4; } return ___jump; }
(x - 32, y, 8, 15);
134
            with (pip2)
135
                
scr_jump_to_point
scr_jump_to_point

function
scr_jump_to_point(arg0, arg1, arg2, arg3, arg4 = 0)
{ var ___jump =
scr_jump_to_point_sprite(arg0, arg1, arg2, arg3, 0, 0);
with (___jump) { trackalpha = arg4; trackblend = arg4; trackindex = arg4; tracksprite = arg4; } return ___jump; }
(x + 32, y, 8, 15);
136
        }
137
        if (timer == 20)
138
        {
139
            safe_delete(pip1);
140
            safe_delete(pip2);
141
            snd_play(snd_board_splash);
142
        }
143
        if (timer == 25)
144
        {
145
            kris.facing = 0;
146
            global.interact = 0;
147
            con++;
148
        }
149
    }
150
    if (con == 40 && bw_ex())
151
    {
152
        con = 5;
153
        timer = 0;
154
    }
155
    if (con == 99 && !bw_ex())
156
        global.interact = 0;
157
    if (kris.boat == true && boated == false)
158
        boated = true;
159
    if (kris.boat == false && boated == true)
160
    {
161
        boated = false;
162
        suwalktimer = 0;
163
        suwalk = 0;
164
    }
165
    if (suwalk == 0 && obj_board_camera.con == 0 && kris.boat == false)
166
    {
167
        suwalktimer++;
168
        if (suwalktimer == 1)
169
            ralsei.follow = true;
170
        if (suwalktimer == 15)
171
        {
172
            
scr_pathfind_to_point
scr_pathfind_to_point

function
scr_pathfind_to_point(arg0, arg1, arg2)
{ var __destx = arg1 + 16; var __desty = arg2 + 16; if (arg1 < 12 && arg2 < 8) { __destx = 128 + (32 * arg1) + 16; __desty = 64 + (32 * arg2) + 16; } with (obj_mainchara_board) { if (name == arg0) { path_end(); is_moving_timer = 0; is_moving = true; path_target_x = __destx; path_target_y = __desty; follow = false; if (argument_count == 4) { if (argument3 != -1) path_end_facing = argument3; } if (argument_count == 5) { if (argument4 != -1) allow_diagonals = argument4; } } } }
("susie", 6, 5, 0);
173
            susie.sleepy = true;
174
        }
175
    }
176
}
177
else
178
{
179
    suwalk = 0;
180
    suwalktimer = 0;
181
}