| 1 |
var xbound_left = 50; |
| 2 |
var xbound_right = 180; |
| 3 |
var ybound_top = 100; |
| 4 |
var ybound_bottom = 190; |
| 5 |
switch (scene) |
| 6 |
{ |
| 7 |
case 0: |
| 8 |
cutscene_wait(2); |
| 9 |
break; |
| 10 |
break; |
| 11 |
case 1: |
| 12 |
cutscene_dialogue(); |
| 13 |
with (msg) |
| 14 |
{ |
| 15 |
ch_msg = 16; |
| 16 |
ch[1] = "Yes"; |
| 17 |
ch[2] = "No"; |
| 18 |
talker[0] = 1161; |
| 19 |
message[0] = "* Ouch... Can't say I was# prepared for that."; |
| 20 |
message[1] = "* I knew my husband was# an engineer but he never# told me about that guy."; |
| 21 |
message[2] = "* He'd mention a robotics# project that could net# him a promotion but..."; |
| 22 |
message[3] = "* He stopped talking# about it after he quit# his job here."; |
| 23 |
message[4] = "* Ugh..."; |
| 24 |
message[5] = "* I would've used force# to bypass \"Axis\" but I...# I'm not sure now."; |
| 25 |
message[6] = "* He may be the last# remnant of Chujin's# talent."; |
| 26 |
message[7] = "* It would be best if we# could just avoid him# from now on..."; |
| 27 |
message[8] = "* ..."; |
| 28 |
message[9] = "* In any case, we're# pretty lucky he's the# only guard-bot around."; |
| 29 |
message[10] = "* Wait a second..."; |
| 30 |
message[11] = "* I have an idea!"; |
| 31 |
message[12] = "* He mentioned how he was# \"lonely\" right? Well# what if we fixed that?"; |
| 32 |
message[13] = "* We could use scraps# lying around to forge a# companion for him!"; |
| 33 |
message[14] = "* He doesn't seem too# bright after all. "; |
| 34 |
message[15] = "* Maybe that's all we# need to distract him?"; |
| 35 |
message[16] = "* What do you think?"; |
| 36 |
prt[0] = 368; |
| 37 |
prt[1] = 377; |
| 38 |
prt[2] = 370; |
| 39 |
prt[3] = 394; |
| 40 |
prt[4] = 368; |
| 41 |
prt[5] = 366; |
| 42 |
prt[6] = 394; |
| 43 |
prt[7] = 370; |
| 44 |
prt[8] = 371; |
| 45 |
prt[9] = 377; |
| 46 |
prt[10] = 393; |
| 47 |
prt[11] = 372; |
| 48 |
prt[12] = 370; |
| 49 |
prt[13] = 371; |
| 50 |
prt[14] = 395; |
| 51 |
prt[15] = 372; |
| 52 |
prt[16] = 370; |
| 53 |
if (outcome == 1) |
| 54 |
{ |
| 55 |
message[17] = "* Great!"; |
| 56 |
message[18] = "* It's the best plan I# could think of."; |
| 57 |
prt[17] = 372; |
| 58 |
prt[18] = 395; |
| 59 |
} |
| 60 |
if (outcome == 2) |
| 61 |
{ |
| 62 |
message[17] = "* You got a better idea?"; |
| 63 |
message[18] = "* It'll be easy, trust# me."; |
| 64 |
prt[17] = 368; |
| 65 |
prt[18] = 370; |
| 66 |
} |
| 67 |
message[19] = "* So... "; |
| 68 |
message[20] = "* We seem to be in some# sort of storage room."; |
| 69 |
message[21] = "* Look around for parts# we can use. Shouldn't# take many."; |
| 70 |
prt[19] = 377; |
| 71 |
prt[20] = 370; |
| 72 |
prt[21] = 370; |
| 73 |
} |
| 74 |
break; |
| 75 |
case 2: |
| 76 |
cutscene_npc_walk(1161, 105, 125, 3, "x", "down"); |
| 77 |
break; |
| 78 |
case 3: |
| 79 |
global.sworks_flag[3] = 1; |
| 80 |
obj_ceroba_npc.npc_direction = "down"; |
| 81 |
scr_cutscene_end(); |
| 82 |
cutscene_advance(); |
| 83 |
break; |
| 84 |
case 4: |
| 85 |
if (obj_ceroba_npc.interact) |
| 86 |
{ |
| 87 |
scr_textscr_textfunction scr_text()
{
if (!instance_exists(obj_dialogue))
msg = instance_create(x, y, obj_dialogue);
} (); |
| 88 |
with (msg) |
| 89 |
{ |
| 90 |
talker[0] = 1161; |
| 91 |
message[0] = "* Find anything that looks# like a makeshift body# part."; |
| 92 |
message[1] = "* I don't know, be# creative."; |
| 93 |
prt[0] = 370; |
| 94 |
prt[1] = 377; |
| 95 |
} |
| 96 |
} |
| 97 |
var robot_part_inside_zone = false; |
| 98 |
if (robot_part_no_loop == false) |
| 99 |
{ |
| 100 |
with (obj_robuild_parent) |
| 101 |
{ |
| 102 |
if (robot_item_is_carried && point_in_rectangle(x, y, xbound_left, ybound_top, xbound_right, ybound_bottom)) |
| 103 |
robot_part_inside_zone = true; |
| 104 |
} |
| 105 |
} |
| 106 |
if (robot_part_inside_zone) |
| 107 |
{ |
| 108 |
if (obj_pl.x > (obj_ceroba_npc.x + 15)) |
| 109 |
{ |
| 110 |
obj_ceroba_npc.npc_direction_hold = "down"; |
| 111 |
obj_ceroba_npc.npc_direction = "right"; |
| 112 |
} |
| 113 |
scr_textscr_textfunction scr_text()
{
if (!instance_exists(obj_dialogue))
msg = instance_create(x, y, obj_dialogue);
} (); |
| 114 |
switch (robot_part_current) |
| 115 |
{ |
| 116 |
case 0: |
| 117 |
with (msg) |
| 118 |
{ |
| 119 |
talker[0] = 1161; |
| 120 |
message[0] = "* You want to use this?"; |
| 121 |
prt[0] = 370; |
| 122 |
ch_msg = 0; |
| 123 |
ch[1] = "Positive"; |
| 124 |
ch[2] = "Negative"; |
| 125 |
} |
| 126 |
break; |
| 127 |
case 1: |
| 128 |
with (msg) |
| 129 |
{ |
| 130 |
talker[0] = 1161; |
| 131 |
message[0] = "* You think this'll work?"; |
| 132 |
prt[0] = 370; |
| 133 |
ch_msg = 0; |
| 134 |
ch[1] = "Certain"; |
| 135 |
ch[2] = "Uncertain"; |
| 136 |
} |
| 137 |
break; |
| 138 |
case 2: |
| 139 |
with (msg) |
| 140 |
{ |
| 141 |
talker[0] = 1161; |
| 142 |
message[0] = "* Is this a good pick?"; |
| 143 |
prt[0] = 370; |
| 144 |
ch_msg = 0; |
| 145 |
ch[1] = "Definitely"; |
| 146 |
ch[2] = "Definitely\nnot"; |
| 147 |
} |
| 148 |
break; |
| 149 |
case 3: |
| 150 |
with (msg) |
| 151 |
{ |
| 152 |
talker[0] = 1161; |
| 153 |
message[0] = "* Is this your final# choice?"; |
| 154 |
prt[0] = 370; |
| 155 |
ch_msg = 0; |
| 156 |
ch[1] = "Yea"; |
| 157 |
ch[2] = "Nay"; |
| 158 |
} |
| 159 |
break; |
| 160 |
} |
| 161 |
with (msg) |
| 162 |
{ |
| 163 |
if (outcome == 1) |
| 164 |
{ |
| 165 |
global.cutscene = true; |
| 166 |
with (obj_robuild_parent) |
| 167 |
{ |
| 168 |
if (robot_item_is_carried == true) |
| 169 |
{ |
| 170 |
robot_item_is_jumping = true; |
| 171 |
robot_item_can_pickup = false; |
| 172 |
robot_item_x_target = obj_steamworks_13_controller.robot_part_xx[obj_steamworks_13_controller.robot_part_current]; |
| 173 |
robot_item_y_target = obj_steamworks_13_controller.robot_part_yy[obj_steamworks_13_controller.robot_part_current]; |
| 174 |
audio_play_sound(snd_playerjump, 1, 0); |
| 175 |
obj_steamworks_13_controller.robot_part[obj_steamworks_13_controller.robot_part_current] = editor_sprite; |
| 176 |
} |
| 177 |
} |
| 178 |
other.robot_part_current += 1; |
| 179 |
other.robot_part_no_loop = true; |
| 180 |
other.scene++; |
| 181 |
} |
| 182 |
if (outcome == 2) |
| 183 |
{ |
| 184 |
message[1] = "* Grab something else# then."; |
| 185 |
prt[1] = 368; |
| 186 |
other.robot_part_no_loop = true; |
| 187 |
} |
| 188 |
} |
| 189 |
} |
| 190 |
break; |
| 191 |
case 5: |
| 192 |
with (obj_robuild_parent) |
| 193 |
{ |
| 194 |
if (robot_item_is_carried) |
| 195 |
exit; |
| 196 |
} |
| 197 |
cutscene_dialogue(); |
| 198 |
switch (robot_part_current) |
| 199 |
{ |
| 200 |
case 1: |
| 201 |
with (msg) |
| 202 |
{ |
| 203 |
talker[0] = 1161; |
| 204 |
message[0] = "* Okay, we'll need three# more objects."; |
| 205 |
prt[0] = 370; |
| 206 |
} |
| 207 |
break; |
| 208 |
case 2: |
| 209 |
with (msg) |
| 210 |
{ |
| 211 |
talker[0] = 1161; |
| 212 |
message[0] = "* Alright, two more and# we can make this thing."; |
| 213 |
prt[0] = 370; |
| 214 |
} |
| 215 |
break; |
| 216 |
case 3: |
| 217 |
with (msg) |
| 218 |
{ |
| 219 |
talker[0] = 1161; |
| 220 |
message[0] = "* One more object should# do the trick."; |
| 221 |
prt[0] = 370; |
| 222 |
} |
| 223 |
break; |
| 224 |
case 4: |
| 225 |
with (msg) |
| 226 |
{ |
| 227 |
talker[0] = 1161; |
| 228 |
message[0] = "* Okay, let's build a# robot!"; |
| 229 |
prt[0] = 372; |
| 230 |
} |
| 231 |
break; |
| 232 |
} |
| 233 |
break; |
| 234 |
case 6: |
| 235 |
if (robot_part_current < 4) |
| 236 |
{ |
| 237 |
scene = 4; |
| 238 |
global.cutscene = false; |
| 239 |
other.robot_part_no_loop = false; |
| 240 |
obj_ceroba_npc.npc_direction = "down"; |
| 241 |
} |
| 242 |
else |
| 243 |
{ |
| 244 |
scene = 7; |
| 245 |
} |
| 246 |
break; |
| 247 |
case 7: |
| 248 |
cutscene_audio_fade(obj_radio.current_song, 0, 800, 0.15, false, true); |
| 249 |
break; |
| 250 |
case 8: |
| 251 |
if (global.dialogue_open) |
| 252 |
exit; |
| 253 |
if (!instance_exists(obj_robot_build_controller)) |
| 254 |
instance_create(0, 0, obj_robot_build_controller); |
| 255 |
for (var i = 0; i < array_length_1d(robot_part); i++) |
| 256 |
obj_robot_build_controller.robot_item[i] = robot_part[i]; |
| 257 |
cutscene_advance(); |
| 258 |
break; |
| 259 |
case 9: |
| 260 |
if (!instance_exists(obj_robot_build_controller)) |
| 261 |
{ |
| 262 |
scr_radio_restart(); |
| 263 |
cutscene_advance(); |
| 264 |
exit; |
| 265 |
} |
| 266 |
if (obj_robot_build_controller.destroy_self == true) |
| 267 |
{ |
| 268 |
with (obj_ceroba_npc) |
| 269 |
{ |
| 270 |
x = 90; |
| 271 |
y = 190; |
| 272 |
npc_direction = "up"; |
| 273 |
} |
| 274 |
with (obj_pl) |
| 275 |
{ |
| 276 |
x = 130; |
| 277 |
y = 190; |
| 278 |
direction = 90; |
| 279 |
} |
| 280 |
if (!instance_exists(obj_steamworks_13_robuild_complete)) |
| 281 |
{ |
| 282 |
instance_create(110, 140, obj_steamworks_13_robuild_complete); |
| 283 |
overworld_robot_sprite[6] = 0; |
| 284 |
for (var i = 0; i < array_length(robot_part); i++) |
| 285 |
{ |
| 286 |
switch (robot_part[i]) |
| 287 |
{ |
| 288 |
case 1515: |
| 289 |
overworld_robot_sprite[2] += 1; |
| 290 |
overworld_robot_sprite[6] += 1; |
| 291 |
break; |
| 292 |
case 1513: |
| 293 |
overworld_robot_sprite[2] += 1; |
| 294 |
overworld_robot_sprite[3] += 1; |
| 295 |
break; |
| 296 |
case 1516: |
| 297 |
overworld_robot_sprite[4] += 1; |
| 298 |
overworld_robot_sprite[6] += 1; |
| 299 |
break; |
| 300 |
case 1522: |
| 301 |
overworld_robot_sprite[4] += 1; |
| 302 |
overworld_robot_sprite[5] += 1; |
| 303 |
break; |
| 304 |
case 1519: |
| 305 |
overworld_robot_sprite[1] += 1; |
| 306 |
break; |
| 307 |
case 1514: |
| 308 |
overworld_robot_sprite[2] += 1; |
| 309 |
overworld_robot_sprite[3] += 1; |
| 310 |
break; |
| 311 |
case 1512: |
| 312 |
overworld_robot_sprite[0] += 2; |
| 313 |
break; |
| 314 |
case 1521: |
| 315 |
overworld_robot_sprite[0] += 1; |
| 316 |
overworld_robot_sprite[4] += 1; |
| 317 |
overworld_robot_sprite[5] += 1; |
| 318 |
break; |
| 319 |
case 1518: |
| 320 |
overworld_robot_sprite[1] += 1; |
| 321 |
overworld_robot_sprite[0] += 1; |
| 322 |
break; |
| 323 |
} |
| 324 |
} |
| 325 |
var new_image_index = 0; |
| 326 |
var max_points = max(overworld_robot_sprite[0], overworld_robot_sprite[1], overworld_robot_sprite[2], overworld_robot_sprite[3], overworld_robot_sprite[4], overworld_robot_sprite[5], overworld_robot_sprite[6]); |
| 327 |
for (var i = 0; i < array_length(overworld_robot_sprite); i++) |
| 328 |
{ |
| 329 |
if (max_points == overworld_robot_sprite[i]) |
| 330 |
{ |
| 331 |
new_image_index = i; |
| 332 |
break; |
| 333 |
} |
| 334 |
} |
| 335 |
global.sworks_flag[44] = new_image_index; |
| 336 |
obj_steamworks_13_robuild_complete.image_index = new_image_index; |
| 337 |
} |
| 338 |
with (obj_robuild_parent) |
| 339 |
{ |
| 340 |
if (point_in_rectangle(x, y, xbound_left, ybound_top, xbound_right, ybound_bottom)) |
| 341 |
instance_destroy(); |
| 342 |
} |
| 343 |
} |
| 344 |
break; |
| 345 |
case 10: |
| 346 |
cutscene_wait(1); |
| 347 |
break; |
| 348 |
case 11: |
| 349 |
cutscene_dialogue(); |
| 350 |
with (msg) |
| 351 |
{ |
| 352 |
talker[0] = 1161; |
| 353 |
message[0] = "* That takes care of# that."; |
| 354 |
message[1] = "* You're kinda creative# when push comes to# shove."; |
| 355 |
message[2] = "* All due respect to# Chujin's work but this# might just fool Axis."; |
| 356 |
message[3] = "* I'll hold onto it for# you."; |
| 357 |
prt[0] = 370; |
| 358 |
prt[1] = 372; |
| 359 |
prt[2] = 395; |
| 360 |
prt[3] = 372; |
| 361 |
} |
| 362 |
break; |
| 363 |
case 12: |
| 364 |
cutscene_npc_walk(1161, 110, 160, 3, "x", "up"); |
| 365 |
break; |
| 366 |
case 13: |
| 367 |
obj_ceroba_npc.action_sprite = true; |
| 368 |
obj_ceroba_npc.sprite_index = spr_ceroba_up_walk; |
| 369 |
obj_ceroba_npc.image_speed = 1/3; |
| 370 |
global.sworks_flag[6] = 4; |
| 371 |
cutscene_advance(); |
| 372 |
break; |
| 373 |
case 14: |
| 374 |
cutscene_wait(0.5); |
| 375 |
break; |
| 376 |
case 15: |
| 377 |
obj_ceroba_npc.action_sprite = false; |
| 378 |
instance_destroy(obj_steamworks_13_robuild_complete); |
| 379 |
cutscene_sfx_play(319, 1); |
| 380 |
break; |
| 381 |
case 16: |
| 382 |
cutscene_npc_direction(1161, "down"); |
| 383 |
break; |
| 384 |
case 17: |
| 385 |
cutscene_wait(0.5); |
| 386 |
break; |
| 387 |
case 18: |
| 388 |
cutscene_dialogue(); |
| 389 |
with (msg) |
| 390 |
{ |
| 391 |
talker[0] = 1161; |
| 392 |
message[0] = "* Let's get outta here,# yeah?"; |
| 393 |
prt[0] = 370; |
| 394 |
} |
| 395 |
break; |
| 396 |
case 19: |
| 397 |
cutscene_npc_walk(1161, obj_pl.x - 30, obj_pl.y, 3, "y", "right"); |
| 398 |
obj_pl.direction = 0; |
| 399 |
break; |
| 400 |
case 20: |
| 401 |
global.party_member = 1171; |
| 402 |
with (instance_create(obj_ceroba_npc.x, obj_ceroba_npc.y, global.party_member)) |
| 403 |
npc_reset = true; |
| 404 |
instance_destroy(obj_ceroba_npc); |
| 405 |
global.sworks_flag[3] = 2; |
| 406 |
instance_destroy(); |
| 407 |
scr_cutscene_end(); |
| 408 |
break; |
| 409 |
} |
| 410 |
if (robot_part_no_loop == true) |
| 411 |
{ |
| 412 |
with (obj_pl) |
| 413 |
{ |
| 414 |
if (!point_in_rectangle(x, y, xbound_left - 10, ybound_top - 10, xbound_right + 10, ybound_bottom + 10)) |
| 415 |
other.robot_part_no_loop = false; |
| 416 |
} |
| 417 |
} |