|
1
|
if (scr_debugscr_debug
function scr_debug()
{
if (global.debug == 1)
return 1;
} ())
|
|
2
|
{
|
|
3
|
if (keyboard_check_pressed(ord("0")) && keyboard_check(ord("W")))
|
|
4
|
room_goto(room_dw_b3bs_extrapuzzle);
|
|
5
|
}
|
|
6
|
if (con == 0)
|
|
7
|
{
|
|
8
|
if (resettile == true)
|
|
9
|
{
|
|
10
|
resettile = false;
|
|
11
|
with (obj_b3bs_switchtile)
|
|
12
|
{
|
|
13
|
with (instance_create(x, y, obj_board_smokepuff))
|
|
14
|
{
|
|
15
|
image_blend = #FFECBD;
|
|
16
|
depth = 100000;
|
|
17
|
}
|
|
18
|
image_index = 0;
|
|
19
|
}
|
|
20
|
tile[3].image_index = 1;
|
|
21
|
tile[8].image_index = 1;
|
|
22
|
}
|
|
23
|
if (scr_debugscr_debug
function scr_debug()
{
if (global.debug == 1)
return 1;
} ())
|
|
24
|
{
|
|
25
|
if (keyboard_check_pressed(vk_f5))
|
|
26
|
{
|
|
27
|
with (obj_b3bs_switchtile)
|
|
28
|
image_index = 1;
|
|
29
|
update = 1;
|
|
30
|
}
|
|
31
|
}
|
|
32
|
if (update == true)
|
|
33
|
{
|
|
34
|
var count = 0;
|
|
35
|
with (obj_b3bs_switchtile)
|
|
36
|
{
|
|
37
|
if (image_index == 1)
|
|
38
|
count++;
|
|
39
|
}
|
|
40
|
if (count == 12)
|
|
41
|
{
|
|
42
|
with (obj_mainchara_board)
|
|
43
|
facing = 0;
|
|
44
|
global.interact = 1;
|
|
45
|
snd_play(snd_won);
|
|
46
|
con = 1;
|
|
47
|
timer = -30;
|
|
48
|
for (var i = 0; i < 12; i++)
|
|
49
|
{
|
|
50
|
with (tile[i])
|
|
51
|
{
|
|
52
|
other.tile[i] = scr_board_markerscr_board_marker
function scr_board_marker()
{
var _thismarker = instance_create(argument0, argument1, obj_board_marker);
_thismarker.sprite_index = argument2;
_thismarker.image_xscale = 2;
_thismarker.image_yscale = 2;
if (argument_count >= 4)
_thismarker.image_speed = argument3;
if (argument_count >= 5)
{
if (argument4 != -1)
_thismarker.depth = argument4;
}
if (argument_count >= 6)
_thismarker.image_xscale = argument5;
if (argument_count >= 6)
_thismarker.image_yscale = argument5;
if (argument_count >= 7)
_thismarker.animateonce = argument6;
return _thismarker;
} (x, y, spr_board_holemarker, 0, depth, 2);
|
|
53
|
other.tile[i].image_index = 1;
|
|
54
|
instance_destroy();
|
|
55
|
}
|
|
56
|
}
|
|
57
|
}
|
|
58
|
update = false;
|
|
59
|
}
|
|
60
|
}
|
|
61
|
if (con == 1)
|
|
62
|
{
|
|
63
|
timer++;
|
|
64
|
for (var i = 0; i < 12; i++)
|
|
65
|
{
|
|
66
|
if (timer == (i * 2))
|
|
67
|
{
|
|
68
|
with (tile[i])
|
|
69
|
{
|
|
70
|
snd_stop(snd_board_splash);
|
|
71
|
snd_play(snd_board_splash);
|
|
72
|
with (instance_create(x, y, obj_board_smokepuff))
|
|
73
|
image_blend = #FFECBD;
|
|
74
|
instance_destroy();
|
|
75
|
}
|
|
76
|
}
|
|
77
|
}
|
|
78
|
if (timer == 24)
|
|
79
|
{
|
|
80
|
var xloc = 256;
|
|
81
|
var yloc = 196;
|
|
82
|
var checkagain = false;
|
|
83
|
var col = collision_rectangle(xloc, yloc, xloc + 32, yloc + 32, obj_mainchara_board, true, true);
|
|
84
|
if (i_ex(col))
|
|
85
|
{
|
|
86
|
debug_print("can't drop it there");
|
|
87
|
checkagain = true;
|
|
88
|
xloc = 288;
|
|
89
|
yloc = 160;
|
|
90
|
}
|
|
91
|
if (checkagain)
|
|
92
|
{
|
|
93
|
col = collision_rectangle(xloc, yloc, xloc + 32, yloc + 32, obj_mainchara_board, true, true);
|
|
94
|
if (i_ex(col))
|
|
95
|
{
|
|
96
|
debug_print("can't drop it there again");
|
|
97
|
xloc = 224;
|
|
98
|
yloc = 192;
|
|
99
|
}
|
|
100
|
}
|
|
101
|
yend = yloc;
|
|
102
|
block = instance_create(xloc, 32, obj_pushableblock_board);
|
|
103
|
snd_play(snd_fall);
|
|
104
|
with (block)
|
|
105
|
gravity = 0.5;
|
|
106
|
timer = 0;
|
|
107
|
con++;
|
|
108
|
}
|
|
109
|
}
|
|
110
|
if (con == 2)
|
|
111
|
{
|
|
112
|
if (instance_exists(block))
|
|
113
|
{
|
|
114
|
if (block.y >= (yend - 8))
|
|
115
|
{
|
|
116
|
block.y = yend;
|
|
117
|
global.flag[1111 save_preegg_block] = 1;
|
|
118
|
global.flag[1109 save_preegg_x] = block.x;
|
|
119
|
global.flag[1110 save_preegg_y] = block.y;
|
|
120
|
snd_play_x(snd_noise, 0.5, 0.8);
|
|
121
|
block.vspeed = 0;
|
|
122
|
block.gravity = 0;
|
|
123
|
global.interact = 0;
|
|
124
|
con = 3;
|
|
125
|
update = false;
|
|
126
|
}
|
|
127
|
}
|
|
128
|
}
|
|
129
|
if (con == 3.2)
|
|
130
|
{
|
|
131
|
global.interact = 0;
|
|
132
|
con = 3;
|
|
133
|
update = true;
|
|
134
|
}
|
|
135
|
if (con <= 3)
|
|
136
|
{
|
|
137
|
spike[0].image_index = switchtile1.pressed;
|
|
138
|
spike[2].image_index = switchtile1.pressed;
|
|
139
|
spike[1].image_index = switchtile2.pressed;
|
|
140
|
spike[3].image_index = switchtile2.pressed;
|
|
141
|
if (i_ex(floorblock))
|
|
142
|
{
|
|
143
|
floorblock.image_xscale = 2;
|
|
144
|
if (switchtile2.pressed)
|
|
145
|
floorblock.image_xscale = 1;
|
|
146
|
}
|
|
147
|
}
|
|
148
|
if (con == 3)
|
|
149
|
{
|
|
150
|
if (global.flag[1111 save_preegg_block] == 1)
|
|
151
|
{
|
|
152
|
var solved = false;
|
|
153
|
if (switchtile1.pressed == true && switchtile2.pressed == true)
|
|
154
|
solved = true;
|
|
155
|
if (solved)
|
|
156
|
{
|
|
157
|
switchtile1.used = true;
|
|
158
|
switchtile2.used = true;
|
|
159
|
snd_play(snd_impact);
|
|
160
|
scr_shakescreenscr_shakescreen
function scr_shakescreen()
{
instance_create(x, y, obj_shake);
} ();
|
|
161
|
for (var i = 0; i < 4; i++)
|
|
162
|
spike[i].image_index = 1;
|
|
163
|
safe_delete(floorblock);
|
|
164
|
global.flag[1111 save_preegg_block] = 2;
|
|
165
|
}
|
|
166
|
}
|
|
167
|
if (resettile == true)
|
|
168
|
{
|
|
169
|
resettile = false;
|
|
170
|
var sucleanup = false;
|
|
171
|
if (i_ex(obj_board_grabobject))
|
|
172
|
sucleanup = true;
|
|
173
|
if (instance_exists(block))
|
|
174
|
{
|
|
175
|
if ((block.x != 256 || block.y != 192) && block.x != 999999)
|
|
176
|
{
|
|
177
|
if (sucleanup)
|
|
178
|
{
|
|
179
|
with (obj_board_grabobject)
|
|
180
|
{
|
|
181
|
if (i_ex(marker))
|
|
182
|
{
|
|
183
|
var markx = marker.x;
|
|
184
|
var marky = marker.y;
|
|
185
|
with (grabbedid)
|
|
186
|
setxy(markx, marky);
|
|
187
|
}
|
|
188
|
else
|
|
189
|
{
|
|
190
|
with (grabbedid)
|
|
191
|
setxy(other.x, other.y);
|
|
192
|
}
|
|
193
|
grabbedid.visible = true;
|
|
194
|
with (marker)
|
|
195
|
instance_destroy();
|
|
196
|
if (i_ex(grabdaddy))
|
|
197
|
{
|
|
198
|
grabdaddy.grabbed = 0;
|
|
199
|
grabdaddy.grab = 0;
|
|
200
|
grabdaddy.canfreemove = 1;
|
|
201
|
}
|
|
202
|
instance_destroy();
|
|
203
|
}
|
|
204
|
}
|
|
205
|
var delaytime = round(point_distance(256, 192, block.x, block.y) / 8) + 1;
|
|
206
|
debug_print("delaytime=" + string(delaytime));
|
|
207
|
con = 3.1;
|
|
208
|
scr_delay_var("con", 3.2, delaytime);
|
|
209
|
global.interact = 1;
|
|
210
|
with (block)
|
|
211
|
{
|
|
212
|
scr_lerpvarscr_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, 256, delaytime, -1, "out");
|
|
213
|
scr_lerpvarscr_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;
} ("y", y, 192, delaytime, -1, "out");
|
|
214
|
con = 999;
|
|
215
|
scr_delay_var("con", 0, delaytime + 1);
|
|
216
|
}
|
|
217
|
}
|
|
218
|
}
|
|
219
|
}
|
|
220
|
if (update == false)
|
|
221
|
{
|
|
222
|
if (instance_exists(obj_board_grabobject))
|
|
223
|
update = true;
|
|
224
|
}
|
|
225
|
var doupdate = true;
|
|
226
|
with (obj_pushableblock_board)
|
|
227
|
{
|
|
228
|
if (con != 0)
|
|
229
|
doupdate = false;
|
|
230
|
}
|
|
231
|
if (update == true && global.interact == 0 && doupdate == true)
|
|
232
|
{
|
|
233
|
if (!instance_exists(obj_board_grabobject))
|
|
234
|
{
|
|
235
|
update = false;
|
|
236
|
if (instance_exists(block))
|
|
237
|
{
|
|
238
|
global.flag[1109 save_preegg_x] = block.x;
|
|
239
|
global.flag[1110 save_preegg_y] = block.y;
|
|
240
|
}
|
|
241
|
debug_message("block x/y=" + string(global.flag[1109 save_preegg_x]) + "|" + string(global.flag[1110 save_preegg_y]));
|
|
242
|
}
|
|
243
|
}
|
|
244
|
}
|
|
245
|
if (endcon == 1)
|
|
246
|
{
|
|
247
|
if (obj_b3bs_console.swordinteract == 1)
|
|
248
|
{
|
|
249
|
endcon = 2;
|
|
250
|
global.interact = 1;
|
|
251
|
global.msc = 1411;
|
|
252
|
scr_textscr_text
function scr_text(arg0)
{
switch (arg0)
{
case 0:
break;
case 10:
global.choicemsg[0] = stringsetloc(#Yes"#Yes", "scr_text_slash_scr_text_gml_8_0" );
global.choicemsg[1] = stringsetloc(#No"#No", "scr_text_slash_scr_text_gml_9_0" );
global.choicemsg[2] = stringsetloc( " ", "scr_text_slash_scr_text_gml_12_0_b" );
global.choicemsg[3] = stringsetloc( " ", "scr_text_slash_scr_text_gml_13_0_b" );
global.msg[0] = stringsetloc(* You really didn't want to throw it away.Wait for input"* You really didn't want to throw it away./", "scr_text_slash_scr_text_gml_12_0" );
global.msg[1] = stringsetloc(* Throw it away anyway?Wait for input"* Throw it away anyway?/", "scr_text_slash_scr_text_gml_13_0" );
global.msg[2] = stringsetloc(Choice type 2 "\\C2 ", "scr_text_slash_scr_text_gml_14_0" );
if (global.chapter >= 2)
msgsetloc(0, * You took it from your pocket.Delay 11 * You have a very,Delay 11 very,Delay 11 bad feeling about throwing it away.Wait for input"* You took it from your pocket^1.&* You have a \\cYvery^1, very^1, bad feeling\\c0 about throwing it away./", "scr_text_slash_scr_text_gml_19_0" );
break;
case 11:
if (global.choice == 0)
{
global.flag[466 junkball_dropped] = 1;
snd_play(snd_bageldefeat);
global.msg[0] = stringsetloc(* Hand shaking,Delay 11 you dropped the ball of junk on the ground.Wait for input"* Hand shaking^1, you dropped the ball of junk on the ground./", "scr_text_slash_scr_text_gml_20_0" );
global.msg[1] = stringsetloc(* It broke into pieces.Wait for input"* It broke into pieces./", "scr_text_slash_scr_text_gml_21_0" );
global.msg[2] = stringsetloc(* You felt bitter.Wait for inputClose Message"* You felt bitter./%", "scr_text_slash_scr_text_gml_22_0" );
script_execute(scr_litemshift, global.menucoord[1], 0);
for (var i = 0; i < 12; i += 1)
global.item[i] = 0;
for (var i = 0; i < 48; i += 1)
{
global.armor[i] = 0;
global.weapon[i] = 0;
}
}
else
{
global.msg[0] = stringsetloc(* You felt a feeling of relief.Wait for inputClose Message"* You felt a feeling of relief./%", "scr_text_slash_scr_text_gml_34_0" );
}
break;
case 100:
global.msg[0] = stringsetloc(* Hey, Kris!Delay 11 What's up?Delay 11 * Didja lose your pencil again?Wait for input"* Hey, Kris^1! What's up^1?&* Didja lose your pencil again?/", "scr_text_slash_scr_text_gml_39_0" );
global.msg[1] = stringsetloc(Face 4* Here,Delay 11 you want the candy-cane one or the one with lights on it?Wait for input"\\E4* Here^1, you want the candy-cane one or the one with lights on it?/", "scr_text_slash_scr_text_gml_40_0" );
global.msg[2] = stringsetloc(Face 1* Huh?Delay 11 * You want to be partners?Wait for input"\\E1* Huh^1?&* You want to be partners?/", "scr_text_slash_scr_text_gml_41_0" );
global.msg[3] = stringsetloc(Face 4* Ummm...Delay 11 Sorry...Delay 11 * Berdly already asked me...Wait for input"\\E4* Ummm..^1. Sorry..^1.&* Berdly already asked me.../", "scr_text_slash_scr_text_gml_42_0" );
global.msg[4] = stringsetloc(Face 0* But I could ask Ms. Alphys if we could make a group of 3!Wait for input"\\E0* But I could ask Ms. Alphys if we could make a group of 3!/", "scr_text_slash_scr_text_gml_43_0" );
global.msg[5] = stringsetloc(Face 4* I'll ask if you're sure!
Not yet Yes. Ask.Choice type 1 "\\E4* I'll ask if you're sure!& &Not yet Yes. Ask.\\C1 ", "scr_text_slash_scr_text_gml_44_0" );
global.msg[6] = stringsetloc( " ", "scr_text_slash_scr_text_gml_47_0" );
break;
case 101:
if (global.choice == 1)
{
global.msg[0] = stringsetloc(Face 0* OK,Delay 11 I'll ask!Wait for input"\\E0* OK^1, I'll ask!/", "scr_text_slash_scr_text_gml_51_0" );
global.msg[1] = stringsetloc(* Miss Alphys!Delay 11 * Umm,Delay 11 is it OK if we have a group of 3?Wait for inputClose Message"* Miss Alphys^1!&* Umm^1, is it OK if we have a group of 3?/%", "scr_text_slash_scr_text_gml_52_0" );
with (obj_classscene)
con = 20;
}
if (global.choice == 0)
global.msg[0] = stringsetloc(Face 4* Yeah,Delay 11 I'm sure there's someone else you can ask!Wait for inputClose Message"\\E4* Yeah^1, I'm sure there's someone else you can ask!/%", "scr_text_slash_scr_text_gml_57_0" );
break;
case 102:
global.msg[0] = stringsetloc(Face 0* Do you wanna be partners? Not yet YesChoice type 1 "\\E0* Do you wanna be partners?&Not yet Yes\\C1 ", "scr_text_slash_scr_text_gml_62_0" );
global.msg[1] = stringsetloc( " ", "scr_text_slash_scr_text_gml_65_0" );
break;
case 103:
if (global.choice == 1)
{
global.msg[0] = stringsetloc(Face 0* OK,Delay 11 I'll ask!Wait for input"\\E0* OK^1, I'll ask!/", "scr_text_slash_scr_text_gml_69_0" );
global.msg[1] = stringsetloc(* Miss Alphys!Delay 11 * Umm,Delay 11 is it OK if we have a group of 3?Wait for inputClose Message"* Miss Alphys^1!&* Umm^1, is it OK if we have a group of 3?/%", "scr_text_slash_scr_text_gml_70_0" );
with (obj_classscene)
con = 20;
}
if (global.choice == 0)
global.msg[0] = stringsetloc(Face 4* Umm,Delay 11 OK.Delay 11 * You just keep doing your thing,Delay 11 Kris.Wait for inputClose Message"\\E4* Umm^1, OK^1.&* You just keep doing your thing^1, Kris./%", "scr_text_slash_scr_text_gml_75_0" );
break;
case 104:
global.msg[0] = stringsetloc(Face 0* Alright.Delay 11 * Let's get this over with.Wait for input"\\E0* Alright^1.&* Let's get this over with./", "scr_text_slash_scr_text_gml_80_0" );
global.msg[1] = stringsetloc(* We'll get more chalk.Delay 11 * Mosey back to class.Delay 11 * And then,Delay 11 Kris...Wait for input"* We'll get more chalk^1.&* Mosey back to class^1.&* And then^1, Kris.../", "scr_text_slash_scr_text_gml_81_0" );
global.msg[2] = stringsetloc(Face 2* YOU'LL do our project.Wait for input"\\E2* YOU'LL do our project./", "scr_text_slash_scr_text_gml_82_0" );
global.msg[3] = stringsetloc(* How's that sound?
Good BadChoice type 1 "* How's that sound?& &Good Bad\\C1 ", "scr_text_slash_scr_text_gml_83_0" );
global.msg[4] = stringsetloc( " ", "scr_text_slash_scr_text_gml_86_0" );
break;
case 105:
global.msg[0] = stringsetloc( Close MessageClose Message" %%", "scr_text_slash_scr_text_gml_90_0" );
break;
case 110:
global.choicemsg[0] = stringsetloc(#Yes"#Yes", "scr_text_slash_scr_text_gml_92_0" );
global.choicemsg[1] = stringsetloc(#No"#No", "scr_text_slash_scr_text_gml_93_0" );
global.choicemsg[2] = stringsetloc( " ", "scr_text_slash_scr_text_gml_96_0" );
global.choicemsg[3] = stringsetloc( " ", "scr_text_slash_scr_text_gml_97_0" );
if (global.flag[100 got_glowshard] == 0)
{
global.msg[0] = stringsetloc(* (There's something glowing inside.)Wait for input"* (There's something glowing inside.)/", "scr_text_slash_scr_text_gml_98_0" );
global.msg[1] = stringsetloc(* (Take it?)Wait for input "* (Take it?)/ ", "scr_text_slash_scr_text_gml_99_0" );
global.msg[2] = stringsetloc( Choice type 2" \\C2", "scr_text_slash_scr_text_gml_100_0" );
}
else
{
global.msg[0] = stringsetloc(* (It's dark inside.)Wait for inputClose Message"* (It's dark inside.)/%", "scr_text_slash_scr_text_gml_104_0" );
}
break;
case 111:
... (global.msc);
|
|
253
|
d_make();
|
|
254
|
}
|
|
255
|
}
|
|
256
|
if (endcon == 2 && !d_ex())
|
|
257
|
{
|
|
258
|
endcon = 1;
|
|
259
|
with (obj_b3bs_console)
|
|
260
|
swordinteract = 0;
|
|
261
|
global.interact = 0;
|
|
262
|
}
|
|
263
|
if (global.flag[1111 save_preegg_block] == 2)
|
|
264
|
{
|
|
265
|
for (var i = 0; i < 4; i++)
|
|
266
|
spike[i].image_index = 1;
|
|
267
|
}
|
|
268
|
if (global.flag[1055 sword_route_progress] >= 6)
|
|
269
|
{
|
|
270
|
with (obj_pushableblock_board)
|
|
271
|
visible = false;
|
|
272
|
with (obj_solidblocksized)
|
|
273
|
{
|
|
274
|
if (x == 120 && y == 320)
|
|
275
|
x = room_width * 40;
|
|
276
|
}
|
|
277
|
}
|