Deltarune (Chapter 3) script viewer

← back to main script listing

gml_Object_obj_b2iceregion_Step_0

(view raw script w/o annotations or w/e)
1
tenna = obj_actor_tenna;
2
active = false;
3
with (obj_board_trigger)
4
{
5
    if (extflag == "b2iceregion_watcher")
6
    {
7
        if (active == true)
8
            other.active = true;
9
    }
10
}
11
if (active == true)
12
{
13
    
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; } } }
();
14
    
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; } }
();
15
    if (con == 0 && obj_board_camera.con == 0)
16
    {
17
        var trig = 0;
18
        with (kris)
19
            trig = instance_place(x, y, obj_board_trigger);
20
        if (i_ex(trig))
21
        {
22
            if (trig.extflag == "b2iceregiontrigger")
23
                con = 1;
24
        }
25
    }
26
}
27
if (ralseiworried == 0 && obj_board_camera.con == 0 && global.flag[1022 tenna_board_absent] == 1)
28
{
29
    with (obj_board_trigger)
30
    {
31
        if (extflag == "b2iceregion_ralworrypart1" && active)
32
        {
33
            var sutalk = stringsetloc(
That's weird. There's something up here.
"That's weird. There's something up here.", "obj_b2iceregion_slash_Step_0_gml_38_0"
);
34
            
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, 120);
35
            var ratalk = stringsetloc(
...
"...", "obj_b2iceregion_slash_Step_0_gml_41_0"
);
36
            
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, 60, ratalk, "ralsei", 2, 60);
37
            other.ralseiworried = 2;
38
        }
39
    }
40
}
41
if (ralseiworried == 2)
42
{
43
    var _trig = 0;
44
    with (obj_board_trigger)
45
    {
46
        if (extflag == "b2iceregion_ralworrypart2" && active)
47
            _trig = 1;
48
    }
49
    if (_trig == 1)
50
    {
51
        ralseiworried = 3;
52
        ralworrytimer = 0;
53
    }
54
}
55
if (tennawarn1 == 0 && obj_board_camera.con == 0)
56
{
57
    var trig = 0;
58
    with (obj_board_trigger)
59
    {
60
        if (active && extflag == "b2iceregion_tennawarning1")
61
            trig = true;
62
    }
63
    if (trig)
64
    {
65
        tennawarn1 = 1;
66
        with (obj_actor_tenna)
67
            bounce = 1;
68
        var tetalk = stringsetloc(
Sorry, nothing up this way, folks!
"Sorry, nothing up this way, folks!", "obj_b2iceregion_slash_Step_0_gml_159_0"
);
69
        if (global.flag[1022 tenna_board_absent] == 0)
70
            
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", 1, 90);
71
    }
72
}
73
if (tennawarn2 == 0 && obj_board_camera.con == 0)
74
{
75
    var trig = 0;
76
    with (obj_board_trigger)
77
    {
78
        if (active && extflag == "b2iceregion_tennawarning2")
79
            trig = true;
80
    }
81
    if (trig)
82
    {
83
        tennawarn2 = 1;
84
        with (obj_actor_tenna)
85
            bounce = 1;
86
        var tetalk = stringsetloc(
See, it just loops!
"See, it just loops!", "obj_b2iceregion_slash_Step_0_gml_175_0"
);
87
        if (global.flag[1022 tenna_board_absent] == 0)
88
            
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", 1, 90);
89
    }
90
}
91
if (tennawarn3 == 0 && obj_board_camera.con == 0)
92
{
93
    var trig = 0;
94
    with (obj_board_trigger)
95
    {
96
        if (active && extflag == "b2iceregion_tennawarning3")
97
            trig = true;
98
    }
99
    if (trig)
100
    {
101
        tennawarn3 = 1;
102
        with (obj_actor_tenna)
103
            bounce = 1;
104
        var tetalk = stringsetloc(
This part's unfinished! Go back!
"This part's unfinished! Go back!", "obj_b2iceregion_slash_Step_0_gml_121_0"
);
105
        if (global.flag[1022 tenna_board_absent] == 0)
106
            
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", 1, 90);
107
    }
108
}
109
if (tennawarn4 == 0 && obj_board_camera.con == 0)
110
{
111
    var trig = 0;
112
    with (obj_board_trigger)
113
    {
114
        if (active && extflag == "b2iceregion_tennawarning4")
115
            trig = true;
116
    }
117
    if (trig)
118
    {
119
        tennawarn4 = 1;
120
        with (obj_actor_tenna)
121
            bounce = 1;
122
        var tetalk = stringsetloc(
Unfinished! UNFINISHED, I said!
"Unfinished! UNFINISHED, I said!", "obj_b2iceregion_slash_Step_0_gml_141_0"
);
123
        if (global.flag[1022 tenna_board_absent] == 0)
124
            
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", 1, 90);
125
    }
126
}
127
if (con == 1 && active == true && global.flag[1022 tenna_board_absent] == 0)
128
{
129
    with (obj_board_boat)
130
    {
131
        if (engaged)
132
            snd_pause(oceansong);
133
    }
134
    global.interact = 1;
135
    tenna.bounce = 1;
136
    
scr_shakeobj_ext
scr_shakeobj_ext

function
scr_shakeobj_ext()
{ var _shakeobj = instance_create(x, y, obj_shakeobj_ext); _shakeobj.target = id; if (argument_count >= 1) { if (i_ex(argument0)) _shakeobj.target = argument0; } if (argument_count >= 2) { if (argument1 != -1) _shakeobj.shakexamt = argument1; } if (argument_count >= 3) { if (argument2 != -1) _shakeobj.shakeyamt = argument2; } if (argument_count >= 4) { if (argument3 != -1) _shakeobj.shakereduct = argument3; } if (argument_count >= 5) { if (argument4 != -1) _shakeobj.shakespeed = argument4; } with (_shakeobj) event_user(0); }
(tenna, 4, 10);
137
    with (obj_caterpillarchara)
138
    {
139
        if (name == "susie")
140
            sprite_index = spr_susie_walk_right_dw_unhappy;
141
        if (name == "ralsei")
142
            sprite_index = spr_ralsei_walk_right_unhappy;
143
    }
144
    with (obj_mainchara)
145
        sprite_index = spr_krisr_dark;
146
    var tetalk = stringsetloc(
MIKE, CUT! CUT!!!
"MIKE, CUT! CUT!!!", "obj_b2iceregion_slash_Step_0_gml_96_0"
);
147
    
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", 1, 60);
148
    
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); }
(tenna, 10);
149
    con = 0.1;
150
    timer = 0;
151
}
152
if (con == 0.1)
153
{
154
    timer++;
155
    if (timer == 45)
156
    {
157
        timer = 0;
158
        con = 2;
159
    }
160
}
161
if (con == 2)
162
{
163
    global.interact = 1;
164
    timer++;
165
    if (timer == 1)
166
    {
167
        loopsnd = snd_loop(snd_tenna_beep_loop);
168
        snd_pitch(loopsnd, 1.2);
169
        instance_create_depth(x, y, -999, obj_technicaldifficultyBars);
170
    }
171
    if (timer == 2)
172
    {
173
        
scr_board_instawarp
scr_board_instawarp

function
scr_board_instawarp(arg0, arg1, arg2, arg3, arg4)
{ with (obj_board_camera) { instawarp = true; if (argument_count == 6) { instawarproomgoto = argument5; camsavex = arg0; camsavey = arg1; } if (arg4 == "left" || arg4 == "right")
scr_quickwarp(arg0, arg1, arg2, arg3 + (obj_board_controller.kris_object.y - 144));
else if (arg4 == "up" || arg4 == "down")
scr_quickwarp(arg0, arg1, arg2 + (obj_board_controller.kris_object.x - 288), arg3);
else
scr_quickwarp(arg0, arg1, arg2, arg3);
} }
(1280, 3648, 1344, 3872);
174
        with (obj_board_cautiontape)
175
        {
176
            inplace = 1;
177
            set = 0;
178
        }
179
    }
180
    if (timer == 3)
181
    {
182
        with (obj_board_boat)
183
        {
184
            if (engaged)
185
                setxy_board(1344, 3840);
186
        }
187
    }
188
    if (timer == 120)
189
    {
190
        snd_stop(snd_tenna_beep_loop);
191
        with (obj_technicaldifficultyBars)
192
            instance_destroy();
193
        with (obj_board_boat)
194
        {
195
            if (engaged)
196
                snd_resume(oceansong);
197
        }
198
        var tetalk = stringsetloc(
Phew! Sorry folks, our contestants got a little lost!
"Phew! Sorry folks, our contestants got a little lost!", "obj_b2iceregion_slash_Step_0_gml_132_0"
);
199
        
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", 1, 120);
200
        tenna.bounce = 1;
201
        global.interact = 0;
202
        con = 10;
203
    }
204
}