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