Deltarune (Chapter 3) script viewer

← back to main script listing

gml_Object_obj_board_event_b2swap_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
        with (kris)
8
        {
9
            if (place_meeting(x, y, obj_board_trigger))
10
            {
11
                var trig = instance_place(x, y, obj_board_trigger);
12
                if (trig.extflag == "b2swap")
13
                {
14
                    global.interact = 1;
15
                    other.con = 1;
16
                }
17
            }
18
        }
19
    }
20
    if (con == 1)
21
    {
22
        timer++;
23
        if (timer == 1)
24
        {
25
            tenna.bounce = true;
26
            var tetalk = stringsetloc(
What!? My beeper!? Zapper got stuck again!? Darnit!
"What!? My beeper!? Zapper got stuck again!? Darnit!", "obj_board_event_b2swap_slash_Step_0_gml_35_0"
);
27
            
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, 90);
28
            global.flag[1024 board_transitioning?] = 1;
29
        }
30
        if (timer == 90)
31
        {
32
            tenna.bounce = true;
33
            var tetalk = stringsetloc(
I have to go. Don't have too much fun without me!
"I have to go. Don't have too much fun without me!", "obj_board_event_b2swap_slash_Step_0_gml_46_0"
);
34
            bubbletrack = 
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, 90);
35
        }
36
        if (timer == 160)
37
        {
38
            with (tenna)
39
                
scr_lerpvar
scr_lerpvar

function
scr_lerpvar()
{ if (argument_count < 6) ___lerpvar =
scr_lerpvar_instance(id, argument[0], argument[1], argument[2], argument[3]);
else ___lerpvar =
scr_lerpvar_instance(id, argument[0], argument[1], argument[2], argument[3], argument[4], argument[5]);
return ___lerpvar; } function scr_lerpvar_respect() { if (argument_count < 6) ___lerpvar =
scr_lerpvar_instance(id, argument[0], argument[1], argument[2], argument[3]);
else ___lerpvar =
scr_lerpvar_instance(id, argument[0], argument[1], argument[2], argument[3], argument[4], argument[5]);
___lerpvar.respectglobalinteract = true; return ___lerpvar; }
("x", x, x + 300, 30, -1, "in");
40
            with (bubbletrack)
41
                
scr_lerpvar
scr_lerpvar

function
scr_lerpvar()
{ if (argument_count < 6) ___lerpvar =
scr_lerpvar_instance(id, argument[0], argument[1], argument[2], argument[3]);
else ___lerpvar =
scr_lerpvar_instance(id, argument[0], argument[1], argument[2], argument[3], argument[4], argument[5]);
return ___lerpvar; } function scr_lerpvar_respect() { if (argument_count < 6) ___lerpvar =
scr_lerpvar_instance(id, argument[0], argument[1], argument[2], argument[3]);
else ___lerpvar =
scr_lerpvar_instance(id, argument[0], argument[1], argument[2], argument[3], argument[4], argument[5]);
___lerpvar.respectglobalinteract = true; return ___lerpvar; }
("x", x, x + 300, 30, -1, "in");
42
            snd_play_delay(snd_slidewhistle, 4);
43
        }
44
        if (timer == 220)
45
        {
46
            timer = 0;
47
            con = 2;
48
        }
49
    }
50
    if (con == 2)
51
    {
52
        timer++;
53
        if (timer == 1)
54
        {
55
            su_real.sprite_index = su_real.usprite;
56
            var sutalk = stringsetloc(
...
"...", "obj_board_event_b2swap_slash_Step_0_gml_67_0"
);
57
            
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);
58
        }
59
        if (timer == 30)
60
            ra_real.sprite_index = ra_real.lsprite;
61
        if (timer == 55)
62
            kr_real.sprite_index = kr_real.lsprite;
63
        if (timer == 60)
64
        {
65
            var ratalk = stringsetloc(
So, um, should be easy for you, right?
"So, um, should be easy for you, right?", "obj_board_event_b2swap_slash_Step_0_gml_80_0"
);
66
            
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, 80);
67
        }
68
        if (timer == 120)
69
        {
70
            
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); }
(su_real, 4);
71
            su_real.sprite_index = spr_susieb_attackready_unarmed;
72
            snd_play(snd_whip_crack_only);
73
            var sutalk = stringsetloc(
Look over there!
"Look over there!", "obj_board_event_b2swap_slash_Step_0_gml_88_0"
);
74
            
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, 45);
75
        }
76
        if (timer == 160)
77
        {
78
            var ratalk = stringsetloc(
Huh?
"Huh?", "obj_board_event_b2swap_slash_Step_0_gml_93_0"
);
79
            
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, 50);
80
            ra_real.sprite_index = ra_real.rsprite;
81
        }
82
        if (timer == 175)
83
        {
84
            with (su_real)
85
                sprite_index = usprite;
86
            con++;
87
            timer = 0;
88
        }
89
    }
90
    if (con == 3)
91
    {
92
        su_real.depth = kr_real.depth + 1;
93
        timer++;
94
        if (timer == 1)
95
        {
96
            kr_real.sprite_index = kr_real.usprite;
97
            with (su_real)
98
            {
99
                image_speed = 0.25;
100
                
scr_move_to_point_over_time
scr_move_to_point_over_time

function
scr_move_to_point_over_time(arg0, arg1, arg2)
{ _mmm = instance_create(x, y, obj_move_to_point); _mmm.target = id; _mmm.movex = arg0; _mmm.movey = arg1; _mmm.movemax = arg2; return _mmm; }
(274, 288, 8);
101
            }
102
        }
103
        if (timer == 14)
104
            su_real.sprite_index = spr_susieu_dark_benddown;
105
        if (timer == 20)
106
        {
107
            
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); }
(su_real, 8);
108
            snd_play(snd_wing);
109
        }
110
        if (timer == 26)
111
        {
112
            
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); }
(su_real, 8);
113
            snd_play(snd_equip);
114
        }
115
        if (timer == 32)
116
        {
117
            with (su_real)
118
            {
119
                sprite_index = usprite;
120
                image_index = 0;
121
                image_speed = 0;
122
                snd_play(snd_wing);
123
            }
124
        }
125
        if (timer == 38)
126
        {
127
            var ratalk = stringsetloc(
?
" ? ", "obj_board_event_b2swap_slash_Step_0_gml_135_0"
);
128
            
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, 30, -1, -1, 14);
129
            
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", 30);
130
            with (su_real)
131
            {
132
                image_speed = 0.25;
133
                sprite_index = dsprite;
134
                
scr_move_to_point_over_time
scr_move_to_point_over_time

function
scr_move_to_point_over_time(arg0, arg1, arg2)
{ _mmm = instance_create(x, y, obj_move_to_point); _mmm.target = id; _mmm.movex = arg0; _mmm.movey = arg1; _mmm.movemax = arg2; return _mmm; }
(140, 392, 8);
135
            }
136
        }
137
        if (timer == 47)
138
        {
139
            with (su_real)
140
            {
141
                image_speed = 0;
142
                sprite_index = usprite;
143
                
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); }
(id, 4);
144
            }
145
            con = 4;
146
            timer = 0;
147
        }
148
    }
149
    if (con == 4)
150
    {
151
        timer++;
152
        if (timer == 1)
153
        {
154
            var sutalk = stringsetloc(
Alright, this puzzle should be easy.
"Alright, this puzzle should be easy.", "obj_board_event_b2swap_slash_Step_0_gml_165_0"
);
155
            
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);
156
        }
157
    }
158
}
159
else
160
{
161
}