Deltarune (Chapter 3) script viewer

← back to main script listing

gml_Object_obj_b0entrance_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 && i_ex(ralsei) && i_ex(kris) && i_ex(susie))
6
    {
7
        timer++;
8
        if (timer == 1)
9
        {
10
            snd_free_all();
11
            global.interact = 0;
12
            with (ralsei)
13
            {
14
                setxy_board(272, 384);
15
                follow = 0;
16
            }
17
        }
18
        if (timer == 1)
19
        {
20
            con = 1;
21
            timer = 0;
22
        }
23
    }
24
    if (con == 1)
25
    {
26
        timer++;
27
        if (timer == 1)
28
        {
29
            global.interact = 0;
30
            tenna.bounce = 1;
31
            var tennacouchtalk = stringsetloc(
Now begin! Our state of the art... adventure!!!
"Now begin! Our state of the art... adventure!!!", "obj_b0entrance_slash_Step_0_gml_40_0"
);
32
            
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; }
(tennacouchtalk, "tenna", 2, 95);
33
        }
34
        if (timer == 80)
35
        {
36
            
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; } } }
("susie", "0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0W0W0W0W0W0W0W0W0W0W0W0W0W0W0W0W0W0W0W0W0L0L0L0L0L0L0L0L0L0L0L0L0L0L0L0L0L0W0W0W0W0W0W0W0W0W0W0W0W0W0W0W0W0W0W0W0W0R0R0R0R0R0R0R0R0R0R0R0R0R0R0R0R0R0R0R0R0R0W0W0W0W0W0W0W0W0W0W0W0W0W0W0W0L0L0L0L0L0L0L0L0L0L0W0W0W0W0W0W0W0W0W0W0W0W0L0L0L0L0L0L0L0L0L0L0L0L0W0W0W0W0W0W0U0U0U0U0U0U0U0U0U0U0U0U0U0U0U0U0U0U0U0U0U0U0U0U0U0U0U0U0U0U0U0W0W0R0R0R0R0R0R0R0R0R0R0R0R0R0R0R0R0R0R0R0R0R0R0W0W0W0W0W0W0W0W0W0W0W0W0W0W0W0W0W0W0W0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0W0W0W0W0W0W0W0W0W0W0D0D0W0W0W0W0W0W0W0W0W0W0W0W0L0L0L0L0L0L0L0L0L0L0L0L0L0L0L0L0L0L0L0L0L0L0L0L0L0W0W0W0W0W0W0W0W0W0W0W0W0W0R0R0R0R0R0R0R0R0R0R0R0R0R0R0R0R0R0R0R0R0R0R0R0W0W0W0W0W0W0W0W0W0W0W0W0W0W0W0W0W0W0L0L0L0L0L0L0L0L0L0L0L0L0L0L0L0L0L0L0L0L0L0L0L0W0W0W0W0W0W0W0W0W0W0W0W0W0W0W0W0W0W0W0W0W0W0W0W0D0D0D0W0W0W0W0W0W0W0W0W0W0W0W0W0W0W0W0W0W0W0W0W0W0W0W0W0W0W0W0W0W0W0W0W0W0W0R0W0W0W0W0W0W0W0W0W0W0W0W0W0W0W0W0W0W0W0W0W0W0W0W0W0W0W0W0W0W0W");
37
            with (obj_mainchara_board)
38
            {
39
                if (name == "susie")
40
                    sleepy = true;
41
            }
42
        }
43
        if (timer == 95)
44
        {
45
            var sutalk = stringsetloc(
Hey, I can#move. Cool.
"Hey, I can#move. Cool.", "obj_b0entrance_slash_Step_0_gml_54_0"
);
46
            
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, 60);
47
        }
48
        if (timer == 125)
49
            
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", "0U0U0U0U0U0U0U0U0U0U0U");
50
        if (timer == 130)
51
        {
52
            var ratalk = stringsetloc(
U-umm, wait!#How do I...
"U-umm, wait!#How do I...", "obj_b0entrance_slash_Step_0_gml_65_0"
);
53
            
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; }
(ratalk, "ralsei", 2, 60);
54
        }
55
        if (timer == 320)
56
        {
57
            with (su_real)
58
            {
59
                sprite_index = spr_susie_walk_right_dw_unhappy;
60
                
scr_resetgameshowcharacter_delay
scr_resetgameshowcharacter_delay

function
scr_resetgameshowcharacter_delay()
{ var _x_smooth = 0; if (argument_count == 3) _x_smooth = 1; return
scr_script_delayed(scr_resetgameshowcharacter, argument1, argument0, _x_smooth);
}
("susie", 80);
61
            }
62
            var susiecouchtalk = stringsetloc(
Looks like crap.
"Looks like crap.", "obj_b0entrance_slash_Step_0_gml_58_0"
);
63
            
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; }
(susiecouchtalk, "susie", 2, 80);
64
            
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; } } }
("susie", "0D0W0W");
65
        }
66
        if (timer == 350)
67
        {
68
            with (ra_real)
69
            {
70
                sprite_index = spr_ralsei_shocked_left;
71
                x -= 16;
72
                y -= 6;
73
                
scr_shakeobj
scr_shakeobj

function
scr_shakeobj()
{ var _shakeobj = instance_create(x, y, obj_shakeobj); _shakeobj.target = id; if (argument_count >= 1) { if (i_ex(argument0)) _shakeobj.target = argument0; } if (argument_count >= 2) { if (argument1 != -1) _shakeobj.shakeamt = argument1; } if (argument_count >= 3) { if (argument2 != -1) _shakeobj.shakereduct = argument2; } with (_shakeobj) event_user(0); }
();
74
                
scr_resetgameshowcharacter_delay
scr_resetgameshowcharacter_delay

function
scr_resetgameshowcharacter_delay()
{ var _x_smooth = 0; if (argument_count == 3) _x_smooth = 1; return
scr_script_delayed(scr_resetgameshowcharacter, argument1, argument0, _x_smooth);
}
("ralsei", 60);
75
            }
76
            var ralseicouchtalk = stringsetloc(
SUSIE!
"SUSIE!", "obj_b0entrance_slash_Step_0_gml_71_0"
);
77
            
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; }
(ralseicouchtalk, "ralsei", 2, 60);
78
        }
79
        if (timer == 380)
80
        {
81
            tenna.bounce = 1;
82
            var tennacouchtalk = stringsetloc(
It's cutting edge!!!
"It's cutting edge!!!", "obj_b0entrance_slash_Step_0_gml_77_0"
);
83
            
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; }
(tennacouchtalk, "tenna", 2, 80);
84
            con++;
85
        }
86
    }
87
    if (suwalk == 0)
88
    {
89
        suwalktimer++;
90
        if (suwalktimer == 1)
91
            ralsei.follow = true;
92
        if (suwalktimer == 30)
93
        {
94
            susie.sleepy = true;
95
            var xloc = choose(4, 5, 6, 7);
96
            var yloc = choose(1, 2, 3, 4, 5);
97
            
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", xloc, yloc, irandom(4));
98
        }
99
    }
100
}
101
else
102
{
103
    suwalktimer = 0;
104
    suwalk = 0;
105
    con = 99;
106
}