Deltarune (Chapter 3) script viewer

← back to main script listing

gml_Object_obj_b1susiedig_Step_0

(view raw script w/o annotations or w/e)
1
if (su == 0)
2
{
3
    with (obj_mainchara_board)
4
    {
5
        if (name == "susie")
6
            other.su = id;
7
    }
8
}
9
if (kr == 0)
10
{
11
    with (obj_mainchara_board)
12
    {
13
        if (name == "kris")
14
            other.kr = id;
15
    }
16
}
17
if (ra == 0)
18
{
19
    with (obj_mainchara_board)
20
    {
21
        if (name == "ralsei")
22
            other.ra = id;
23
    }
24
}
25
if (tenna == 0)
26
    tenna = obj_actor_tenna;
27
if (realralsei == 0)
28
{
29
    with (obj_caterpillarchara)
30
    {
31
        if (name == "ralsei")
32
            other.realralsei = id;
33
    }
34
}
35
if (realsusie == 0)
36
{
37
    with (obj_caterpillarchara)
38
    {
39
        if (name == "susie")
40
            other.realsusie = id;
41
    }
42
}
43
var mytrigger = "susiedig";
44
if (
scr_debug
scr_debug

function
scr_debug()
{ if (global.debug == 1) return 1; }
())
45
{
46
    if (keyboard_check_pressed(ord("F")))
47
    {
48
        if (ra.myhealth > 1)
49
            ra.myhealth = 1;
50
    }
51
}
52
if (active == 1)
53
{
54
    if (global.interact == 0)
55
    {
56
        if (con == 0 && obj_board_camera.con == 0 && global.flag[1020 got_power_croissant] == 0)
57
        {
58
            ra.follow = true;
59
            if (susiewalkcon == 0)
60
            {
61
                var walk = "0W0W0W0W0W0W0W0W0W0W0W0W0W0W0W0W0W0W0W0W0W0W0W0W0W0W0W0W0L0L0L0L0L0L0L0L0L0L0L0L0L0L0L0L0L0L0L0L0L0L0L0L0L0L0L0L0L0L0L0L0L0L0L0L0L0W0W0W0W0W0W0W0W0W0W0W0W0W0W0W0W0W0W0W0W0W0W0W0W0W0W0R0R0R0R0R0R0R0R0R0R0R0R0W0W0W0W0W0W0W0W0W0W0W0W0W0W0W0W0W0W0W0W0W0W0U0U0U0U0U0U0U0U0U0U0U0U0U0U0U0U0U0L0L0L0L0L0L0L0L0L0L0L0L0L0L0W0W0W0W0W0W0W0W0W0W0W0W0W0W0W0W0W0L0L0L0L0L0L0L0L0L0L0L0L0L0L0L0L0L0W0W0W0W0W0W0W0W0W0W0W0W0W0W0W0W0W0D0D0D0D0D0D0D0D0W0W0W0W0W0W0W0W0W0W0W0W0W0W0W0W0W0W0W0W0W0W0W0W0W0W0W0W0W0R0R0R0R0R0R0R0R0R0R0R0R0R0R0R0R0R0R0R0R0R0R0R0R0R0R0R0R0R0R0R0R0R0R0R0R0R0R0R0R0R0W0W0W0D0D0W0W0W0W0W0W0W0W0W0W0W0W0W0W0W0W0W0W0W0W0W0W0W0W0W0W0W0W0W0W0W0W0W0W0W0W0W0W0W0W0W0W0W0W0W0W0W0W0W0W";
62
                if (visit > 0)
63
                {
64
                    var visit2walk0 = "0L0L0L0L0L0L0L0L0L0L0L0L0L0L0L0L0L0L0L0W0W0W0W0W0L0L0L0W0W0W0W0W0W0W0W0W0W0W0W0W0W0W0W0W0U0U0U0U0U0U0U0U0U0L0L0L0L0L0L0L0L0L0L0L0L0L0L0W0W0W0W0W0W0W0W0W0W0W0W0W0W0W0W0W0W0W0W0D0D0D0D0D0D0D0W0W0W0R0R0R0R0R0W0W0W0W0W0W0W0W0W0W0W0W0W0W0W0W0L0L0L0L0W0W0W0W0W0W0W0W0W0W0W0W0W0W0W0W0R0R0R0R0R0W0W0W0W0W0W0W0W0W0W0W0W0W0W0W0W0L0L0L0L0L0W0W0W0W0W0W0W0W0W0W0W0W0W0W0W0W0R0R0R0R0R0W0W0W0W0W0W0W0W0W0D0D0D0D0D0D0D0D0D0D0D0D0R0R0R0R0R0R0R0R0R0R0R0R0R0R0R";
65
                    var visit2walk1 = "0L0L0L0L0L0L0L0L0L0L0L0L0L0L0L0L0L0L0L0L0L0L0L0L0L0L0L0L0L0L0L0L0L0L0L0L0L0L0L0L0L0L0L0L0L0W0W0W0W0W0W0W0W0W0W0W0W0W0W0W0W0W0W0W0W0W0W0W0W0W0W0W0W0W0W0W0W0W0W0W0W0W0W0W0W0W0R0R0R0R0R0R0R0R0R0R0R0R0R0R0R0R0R0R0R0W0W0W0W0W0W0W0W0W0W0W0W0W0W0W0W0W0W0W0W0W0W0W0W0W0W0W0W0W0W0U0U0U0U0U0U0U0U0U0U0U0U0W0W0W0R0R0R0R0R0R0R0R0R0R0R0R0R0R0W0W0W0W0W0W0W0W0W0W0W0W0W0W0W0W0W0D0D0D0D0D";
66
                    var visit2walk2 = "0L0L0L0L0L0L0L0L0L0L0L0L0L0L0L0L0L0L0L0L0L0L0L0L0L0L0L0L0L0L0L0L0L0L0L0L0L0L0L0L0L0L0L0L0L0L0L0L0L0L0L0L0L0L0L0L0W0W0W0W0W0W0W0W0W0W0W0W0W0W0W0W0W0W0W0W0W0W0W0W0R0R0R0R0R0R0R0R0R0R0R0R0R0R0R0R0W0W0W0W0W0W0W0W0W0W0W0W0W0W0W0W0W0W0W0W0W0W0W0W0W0W0L0L0L0L0L0L0L0L0L0L0L0L0L0L0L0W0W0W0W0W0W0W0W0W0W0W0W0W0W0W0W0W0W0W0W0W0W0W0W0W0R0R0R0R0R0R0R0R0R0R0R0R0R0R0R0R0R0R0R0R0R0R0R0R0R0R0R0R0R0R0D0D0D0D0D0D0D0D0D0D0R0R0R0R0R0R0R0R0R0U0U";
67
                    walk = visit2walk2;
68
                    su.sleepy = true;
69
                }
70
                
scr_play_susie_recording
scr_play_susie_recording

function
scr_play_susie_recording(arg0)
{ with (obj_mainchara_board) { if (name == "susie") { susierecordcon = 2; susierecordcount = 0; susierecordstring = arg0; susierecordsave = false; } } }
(walk);
71
                sustalktimer = 0;
72
                if (visit == 0)
73
                    susiewalkcon = 1;
74
                else
75
                    susiewalkcon = 20;
76
            }
77
            if (susiewalkcon == 1)
78
            {
79
                sustalktimer++;
80
                if (sustalktimer == 5)
81
                {
82
                    visit++;
83
                    tenna.bounce = 1;
84
                    var tetalk = stringsetloc(
Uh oh! Weed alert!
"Uh oh! Weed alert!", "obj_b1susiedig_slash_Step_0_gml_64_0"
);
85
                    
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, 61);
86
                }
87
                if (sustalktimer == 65)
88
                {
89
                    tenna.bounce = 1;
90
                    var tetalk = stringsetloc(
You may find plucking these plants is "key"!
"You may find plucking these plants is \"key\"!", "obj_b1susiedig_slash_Step_0_gml_70_0"
);
91
                    
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, 71);
92
                }
93
                if (sustalktimer == 135)
94
                {
95
                    tenna.bounce = 1;
96
                    var tetalk = stringsetloc(
But you can't grip this grass without a "special treasure."
"But you can't grip this grass without a \"special treasure.\"", "obj_b1susiedig_slash_Step_0_gml_76_0"
);
97
                    
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, 71);
98
                }
99
                if (sustalktimer == 205)
100
                {
101
                    tenna.bounce = 1;
102
                    var tetalk = stringsetloc(
Can you find it somewhere on the board?
"Can you find it somewhere on the board?", "obj_b1susiedig_slash_Step_0_gml_82_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, 70);
104
                }
105
                if (sustalktimer == 575)
106
                {
107
                    tenna.bounce = 1;
108
                    snd_play(snd_laughtrack_short_temp);
109
                    var tetalk = stringsetloc(
Guys. It's not in this room. It's in another room. Please.
"Guys. It's not in this room. It's in another room. Please.", "obj_b1susiedig_slash_Step_0_gml_89_0"
);
110
                    
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);
111
                }
112
            }
113
        }
114
        if (con == 0 && obj_board_camera.con == 0 && global.flag[1020 got_power_croissant] == 1)
115
        {
116
            var triggered = 0;
117
            with (kr)
118
            {
119
                if (place_meeting(x, y, obj_board_trigger))
120
                {
121
                    var inst = instance_place(x, y, obj_board_trigger);
122
                    if (inst.extflag == mytrigger)
123
                        triggered = 1;
124
                }
125
            }
126
            if (triggered == 1)
127
            {
128
                with (obj_board_trigger)
129
                {
130
                    if (extflag == mytrigger)
131
                        instance_destroy();
132
                }
133
                with (su)
134
                    setxy(other.kr.x, other.kr.y);
135
                with (ra)
136
                {
137
                    setxy(other.kr.x, other.kr.y);
138
                    
scr_board_caterpillar_interpolate
scr_board_caterpillar_interpolate

function
scr_board_caterpillar_interpolate()
{ var _____kris = 0; with (obj_mainchara_board) { if (name == "kris") _____kris = id; } if (_____kris != 0) { remx[0] = _____kris.x; remy[0] = _____kris.y; for (var __rempos = 75; __rempos > 0; __rempos -= 1) { remx[__rempos] = lerp(_____kris.x, x, __rempos / 75); remy[__rempos] = lerp(_____kris.y, y + 6, __rempos / 75); } } }
();
139
                    follow = true;
140
                }
141
                blocker1 = instance_create_board(11, 5, obj_board_solid);
142
                blocker1.visible = true;
143
                blocker1.image_alpha = true;
144
                blocker1.sprite_index = spr_board_tennastatueblocker;
145
                with (blocker1)
146
                    
scr_depth_board
scr_depth_board

function
scr_depth_board()
{ depth = 1000000 - ((y * 10) + ((sprite_height - sprite_yoffset) * 10)); } function scr_board_depth() {
scr_depth_board();
}
();
147
                
scr_darksize
scr_darksize

function
scr_darksize()
{ var inst = id; if (argument_count) inst = argument0; inst.image_xscale = 2; inst.image_yscale = 2; }
(blocker1);
148
                with (blocker1)
149
                {
150
                    with (instance_create(x, y, obj_board_smokepuff))
151
                        image_blend = #E27A5C;
152
                }
153
                blocker2 = instance_create_board(10, 5, obj_board_solid);
154
                blocker2.visible = true;
155
                blocker2.image_alpha = true;
156
                blocker2.sprite_index = spr_board_tennastatueblocker;
157
                with (blocker2)
158
                    
scr_depth_board
scr_depth_board

function
scr_depth_board()
{ depth = 1000000 - ((y * 10) + ((sprite_height - sprite_yoffset) * 10)); } function scr_board_depth() {
scr_depth_board();
}
();
159
                with (blocker2)
160
                {
161
                    with (instance_create(x, y, obj_board_smokepuff))
162
                        image_blend = #E27A5C;
163
                }
164
                
scr_darksize
scr_darksize

function
scr_darksize()
{ var inst = id; if (argument_count) inst = argument0; inst.image_xscale = 2; inst.image_yscale = 2; }
(blocker2);
165
                with (obj_mainchara_board)
166
                {
167
                    if (x > 416)
168
                    {
169
                        x = 416;
170
                        if (name == "ralsei")
171
                            
scr_board_caterpillar_interpolate
scr_board_caterpillar_interpolate

function
scr_board_caterpillar_interpolate()
{ var _____kris = 0; with (obj_mainchara_board) { if (name == "kris") _____kris = id; } if (_____kris != 0) { remx[0] = _____kris.x; remy[0] = _____kris.y; for (var __rempos = 75; __rempos > 0; __rempos -= 1) { remx[__rempos] = lerp(_____kris.x, x, __rempos / 75); remy[__rempos] = lerp(_____kris.y, y + 6, __rempos / 75); } } }
();
172
                    }
173
                }
174
                snd_play(snd_board_splash);
175
                snd_play(snd_board_door_close);
176
                krishealth = kr.myhealth;
177
                ralseihealth = ra.myhealth;
178
                con = 0.5;
179
            }
180
        }
181
        if (con == 0.5)
182
        {
183
            with (su)
184
            {
185
                if (x != board_tilex(5))
186
                {
187
                    x -= 4;
188
                    facing = 3;
189
                    image_speed = 0.25;
190
                }
191
                else
192
                {
193
                    other.con += 0.1;
194
                }
195
                timer = 0;
196
            }
197
        }
198
        if (con == 0.6)
199
        {
200
            with (su)
201
            {
202
                if (y != board_tiley(3))
203
                {
204
                    y -= 4;
205
                    facing = 2;
206
                }
207
                else
208
                {
209
                    facing = 0;
210
                    other.timer++;
211
                    image_speed = 0;
212
                }
213
            }
214
            if (timer == 1)
215
            {
216
            }
217
            if (timer == 15)
218
            {
219
                with (realsusie)
220
                {
221
                    sprite_index = rsprite;
222
                    scr_delay_var("sprite_index", usprite, 30);
223
                }
224
                var susietalk = stringsetloc(
Weeds? Leave it to me.
"Weeds? Leave it to me.", "obj_b1susiedig_slash_Step_0_gml_210_0"
);
225
                
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; }
(susietalk, "susie", 1, 60);
226
            }
227
            if (timer > 30)
228
            {
229
                con = 1;
230
                timer = 0;
231
            }
232
        }
233
        if (con == 1)
234
        {
235
            fakesu = instance_create(su.x, su.y, obj_board_susiedig_fakesusie);
236
            su.x = 128;
237
            su.y = 64;
238
            su.canfreemove = 0;
239
            su.image_alpha = 0;
240
            timer = 0;
241
            con = 2;
242
        }
243
        if (con == 2)
244
        {
245
            timer++;
246
            if (raldie == 0)
247
            {
248
                with (obj_mainchara_board)
249
                {
250
                    if (name == "ralsei")
251
                    {
252
                        if (myhealth <= 0)
253
                        {
254
                            other.raldie = 1;
255
                            other.timer = 999;
256
                            var ratalk = stringsetloc(
SUSIE!!
"SUSIE!!", "obj_b1susiedig_slash_Step_0_gml_243_0"
);
257
                            
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);
258
                            with (obj_caterpillarchara)
259
                            {
260
                                if (name == "ralsei")
261
                                    
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); }
();
262
                            }
263
                        }
264
                    }
265
                }
266
            }
267
            if (timer == 5)
268
            {
269
                var ratalk = stringsetloc(
You've, um, "got this," Susie!
"You've, um, \"got this,\" Susie!", "obj_b1susiedig_slash_Step_0_gml_239_0"
);
270
                
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);
271
                realralsei.sprite_index = realralsei.lsprite;
272
            }
273
            if (timer == 70)
274
            {
275
                with (realralsei)
276
                {
277
                    sprite_index = spr_ralsei_shocked_behind;
278
                    scr_delay_var("sprite_index", usprite, 60);
279
                    
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); }
();
280
                }
281
                var ratalk = stringsetloc(
W-wait! Watch where you're throwing!!
"W-wait! Watch where you're throwing!!", "obj_b1susiedig_slash_Step_0_gml_251_0"
);
282
                
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);
283
            }
284
            if (timer == 145)
285
            {
286
                var sutalk = stringsetloc(
Watch what?
"Watch what?", "obj_b1susiedig_slash_Step_0_gml_256_0"
);
287
                
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);
288
            }
289
            if (fakesu.con == 99 && !i_ex(obj_board_grabobject))
290
            {
291
                su.x = fakesu.x;
292
                su.y = fakesu.y;
293
                su.image_alpha = 1;
294
                safe_delete(fakesu);
295
                su.canfreemove = 1;
296
                con++;
297
            }
298
            if (raldie && ra.myhealth > 0)
299
            {
300
                with (obj_mainchara_board)
301
                {
302
                    if (name == "ralsei")
303
                    {
304
                        visible = true;
305
                        image_alpha = 1;
306
                    }
307
                }
308
                debug_print("revived ralsei");
309
                raldie = 0;
310
            }
311
        }
312
        if (con == 3)
313
        {
314
            su.canfreemove = 1;
315
            var pickupcount = 0;
316
            with (obj_board_pickup)
317
            {
318
                if (x >= 128 && x <= 512 && y >= 64 && y <= 320)
319
                    pickupcount++;
320
            }
321
            if (pickupcount == 1 && !teend)
322
            {
323
                if (ra.myhealth > 0)
324
                    
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; } } } }
("ralsei", 9, 6, 2);
325
                else
326
                    killer = true;
327
                teend = true;
328
                var tetalk = stringsetloc(
Well, you somehow survived! Take a key!
"Well, you somehow survived! Take a key!", "obj_b1susiedig_slash_Step_0_gml_301_0"
);
329
                if (killer == true)
330
                    tetalk = stringsetloc(
Well, some of you survived! Take a key!
"Well, some of you survived! Take a key!", "obj_b1susiedig_slash_Step_0_gml_302_0"
);
331
                
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);
332
                with (obj_actor_tenna)
333
                    bounce = true;
334
            }
335
            if (pickupcount == 0)
336
                con++;
337
        }
338
        if (con == 4)
339
        {
340
            snd_play(snd_impact);
341
            with (blocker1)
342
                instance_create(x, y, obj_board_smokepuff);
343
            safe_delete(blocker1);
344
            with (blocker2)
345
                instance_create(x, y, obj_board_smokepuff);
346
            safe_delete(blocker2);
347
            
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", 9, 4, 0);
348
            timer = 0;
349
            con++;
350
        }
351
        if (con == 5)
352
        {
353
            if (
scr_board_checklocation
scr_board_checklocation

function
scr_board_checklocation()
{ var _name = argument0; var _xloc = argument1; var _yloc = argument2; if (_xloc < 12) _xloc = board_tilex(_xloc); if (_yloc < 12) _yloc = board_tiley(_yloc); var _tol = 4; if (argument_count == 4) _tol = argument3; var targ = 0; with (obj_mainchara_board) { if (name == _name) targ = id; } if (!i_ex(targ)) { debug_message("target does not exist"); return false; } if (abs(targ.x - _xloc) < _tol && abs(targ.y - _yloc) < _tol) return true; }
("kris", 9, 5, 24))
354
            {
355
                con = 5.5;
356
                
scr_board_caterpillar_interpolate_ralsei
scr_board_caterpillar_interpolate_ralsei

function
scr_board_caterpillar_interpolate_ralsei()
{ var _ralsei = obj_board_controller.ralsei_object; if (_ralsei != -1) { with (_ralsei) { for (i = 0; i < 75; i += 1) { remx[i] = x; remy[i] = y; facing[i] = 0; } } var _a = 0; var _dir = point_direction(_ralsei.x, _ralsei.y, x, y); repeat (_ralsei.ralsei_target) { _ralsei.remx[_a] = lerp(obj_board_controller.kris_object.x, _ralsei.x, _a / _ralsei.ralsei_target); _ralsei.remy[_a] = lerp(obj_board_controller.kris_object.y, _ralsei.y, _a / _ralsei.ralsei_target); if (_dir >= 45 && _dir < 135) _ralsei.facingdir[_a] = 2; else if (_dir >= 135 && _dir < 225) _ralsei.facingdir[_a] = 3; else if (_dir >= 225 && _dir < 315) _ralsei.facingdir[_a] = 0; else if (_dir >= 315 || _dir < 45) _ralsei.facingdir[_a] = 1; _a++; } } }
();
357
                ra.follow = 1;
358
            }
359
        }
360
        if (con == 6 && obj_board_camera.con == 0)
361
        {
362
            timer++;
363
            if (timer == 5)
364
            {
365
                var sustring = stringsetloc(
Wanna do it again?
"Wanna do it again?", "obj_b1susiedig_slash_Step_0_gml_340_0"
);
366
                
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; }
(sustring, "susie", 2, 70);
367
            }
368
            if (timer == 65)
369
            {
370
                var rastring = stringsetloc(
Umm, I think we're good.
"Umm, I think we're good.", "obj_b1susiedig_slash_Step_0_gml_345_0"
);
371
                
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; }
(rastring, "ralsei", 2, 60);
372
                con++;
373
            }
374
        }
375
    }
376
}
377
else
378
{
379
    sustalktimer = 0;
380
    susiewalkcon = 0;
381
    if (con == 5.5)
382
        con = 6;
383
}
384
if (startsong == 1)
385
{
386
    stime1++;
387
    if (stime1 == 1)
388
    {
389
        debug_print("start music");
390
        snd_volume(global.currentsong[1], 0, 30);
391
    }
392
    if (stime1 == 31)
393
    {
394
        snd_stop(global.currentsong[1]);
395
        global.currentsong[0] = snd_init("baci_perugina.ogg");
396
        global.currentsong[1] = mus_loop_ext(global.currentsong[0], 1, 1.2);
397
        startsong = 2;
398
    }
399
}
400
if (endsong == 1)
401
{
402
    stime2++;
403
    if (stime2 == 1)
404
    {
405
        debug_print("end music");
406
        mus_fade(global.currentsong[1], 30);
407
    }
408
    if (stime2 == 31)
409
    {
410
        snd_stop(global.currentsong[1]);
411
        global.currentsong[0] = snd_init("board_zelda.ogg");
412
        global.currentsong[1] = mus_loop(global.currentsong[0]);
413
        stime2 = 0;
414
        endsong = 2;
415
    }
416
}