Deltarune (Chapter 3) script viewer

← back to main script listing

gml_Object_obj_board_b2_watersign_Step_0

(view raw script w/o annotations or w/e)
1
buffer--;
2
if (obj_b2iceregion.ralseiworried >= 2)
3
{
4
    safe_delete(boatsolid);
5
    instance_destroy();
6
}
7
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; } } }
();
8
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; } }
();
9
if (con == 1)
10
{
11
    global.interact = 1;
12
    
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");
13
    msgsetloc(0, 
UNDER CONSTRUCTION!Delay 11 KEEP OUT!Wait for inputClose Message
"UNDER CONSTRUCTION^1! KEEP OUT!/%", "obj_board_b2_watersign_slash_Step_0_gml_12_0"
);
14
    bw_make();
15
    con = 1.1;
16
}
17
if (con == 1.1 && !bw_ex())
18
    con = 1.999;
19
if (con == 1.999)
20
{
21
    if (global.flag[1022 tenna_board_absent] == 1)
22
    {
23
        safe_delete(boatsolid);
24
        var sutalk = stringsetloc(
He's not here, now's our chance.
"He's not here, now's our chance.", "obj_board_b2_watersign_slash_Step_0_gml_24_0"
);
25
        
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; }
(sutalk, "susie", 2, 90);
26
        con = 2;
27
    }
28
    else
29
    {
30
        con = 0;
31
        global.interact = 0;
32
        buffer = 3;
33
    }
34
}
35
if (con == 2)
36
{
37
    if (!i_ex(obj_couchwriter) || button1_p() || button3_h())
38
    {
39
        safe_delete(obj_couchwriter);
40
        con = 3;
41
        timer = 0;
42
    }
43
}
44
if (con == 3)
45
{
46
    timer++;
47
    if (timer == 1)
48
    {
49
        obj_board_boat.updateplayerdepth = false;
50
        susie.fun = true;
51
        susie.depth -= 10;
52
    }
53
    if (timer == 15)
54
    {
55
        grabbed = true;
56
        snd_play(snd_board_lift);
57
        susie.fun = 1;
58
        susie.sprite_index = susie.usprite_carry;
59
        y = susie.y - 24;
60
        x = susie.x;
61
        depth = susie.depth - 10;
62
        updatedepth = false;
63
    }
64
    var xloc = susie.x - 128;
65
    if (xloc < board_tilex(2))
66
        xloc = susie.x + 128;
67
    if (timer == 25)
68
    {
69
        if (xloc < susie.x)
70
            susie.sprite_index = susie.lsprite_carry;
71
        else
72
            susie.sprite_index = susie.rsprite_carry;
73
    }
74
    var throwtime = 16;
75
    if (timer == 30)
76
    {
77
        snd_play(snd_board_throw);
78
        var yloc = round((susie.y + 32) / 32) * 32;
79
        
scr_jump_to_point_board
scr_jump_to_point_board

function
scr_jump_to_point_board(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; board = true; } return ___jump; }
(xloc, yloc - 32, 12, throwtime);
80
    }
81
    if (timer == 31)
82
    {
83
        if (xloc < susie.x)
84
            susie.sprite_index = susie.lsprite;
85
        else
86
            susie.sprite_index = susie.rsprite;
87
    }
88
    if (timer == ((70 + throwtime) - 40))
89
    {
90
        susie.fun = 0;
91
        snd_play(snd_board_splash);
92
        with (object_index)
93
            decor = true;
94
        grabbed = false;
95
        obj_board_boat.canfreemove = true;
96
        obj_board_boat.updateplayerdepth = true;
97
        con++;
98
        timer = 0;
99
    }
100
}
101
if (con == 4)
102
{
103
    timer++;
104
    if (timer == 1)
105
        global.interact = 0;
106
    if (timer == 15)
107
    {
108
        boatsolid = instance_create(x, y, obj_board_boatsolid);
109
        
scr_darksize
scr_darksize

function
scr_darksize()
{ var inst = id; if (argument_count) inst = argument0; inst.image_xscale = 2; inst.image_yscale = 2; }
(boatsolid);
110
        boatsolid.sprite_index = sprite_index;
111
    }
112
    if (obj_board_camera.shift == "left" || obj_board_camera.shift == "right" || obj_board_camera.shift == "down")
113
    {
114
        var sutalk = stringsetloc(
Alright, sign thrown.
"Alright, sign thrown.", "obj_board_b2_watersign_slash_Step_0_gml_132_0"
);
115
        
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; }
(sutalk, "susie", 2, 80);
116
        var ratalk = stringsetloc(
... that's what you meant!?
"... that's what you meant!?", "obj_board_b2_watersign_slash_Step_0_gml_135_0"
);
117
        
scr_script_delayed
scr_script_delayed

function
scr_script_delayed()
{ var __scriptdelay = instance_create(0, 0, obj_script_delayed); __scriptdelay.script = argument[0]; __scriptdelay.alarm[0] = argument[1]; __scriptdelay.target = id; for (var __i = 0; __i < (argument_count - 2); __i++) __scriptdelay.script_arg[__i] = argument[__i + 2]; __scriptdelay.arg_count = argument_count - 2; return __scriptdelay; }
(scr_couchtalk, 40, ratalk, "ralsei", 2, 80);
118
        con = 0;
119
    }
120
    if (obj_board_camera.shift == "up")
121
        con = 0;
122
}