1 |
################# |
2 |
### VARIABLES ### |
3 |
################# |
4 |
|
5 |
var int var_counter = 0; |
6 |
|
7 |
############ |
8 |
### MAIN ### |
9 |
############ |
10 |
|
11 |
func void main(void) |
12 |
{ |
13 |
gl_fog_red = .15 |
14 |
gl_fog_blue = .15 |
15 |
gl_fog_green = .15 |
16 |
gl_fog_start = .995 |
17 |
gs_farclipplane_set 5000 |
18 |
ui_suppress_prompt = 1 |
19 |
chr_auto_aim_dist = 0 |
20 |
if(save_point > 0) start |
21 |
} |
22 |
|
23 |
############# |
24 |
### START ### |
25 |
############# |
26 |
|
27 |
func void start(string ai_name) |
28 |
{ |
29 |
fork deactivate_stuff |
30 |
splash_screen warehouse_splash_screen |
31 |
if(save_point eq 1) save_point = 2 |
32 |
if(save_point eq 2) fork intro |
33 |
if(save_point eq 3) restore_game |
34 |
if(save_point eq 4) restore_game |
35 |
if(save_point eq 5) restore_game |
36 |
sleep 5 |
37 |
fork sp_all |
38 |
} |
39 |
|
40 |
func void deactivate_stuff(void) |
41 |
{ |
42 |
#not used |
43 |
trigvolume_enable tv_train_movement 0 |
44 |
console_deactivate 4 |
45 |
trigvolume_enable alarm_trigvol 0 |
46 |
trigvolume_enable mid_warehouse_target 0 |
47 |
trigvolume_enable setup_bay3_tv 0 |
48 |
trigvolume_enable trigger_volume_01 0 |
49 |
trigvolume_enable trigger_volume_06 0 |
50 |
trigvolume_enable trigger_volume_63 0 |
51 |
trigvolume_enable trigger_volume_64 0 |
52 |
trigvolume_enable trigger_volume_65 0 |
53 |
trigvolume_enable trigger_volume_68 0 |
54 |
trigvolume_enable trigger_volume_70 0 |
55 |
trigvolume_enable trigger_volume_76 0 |
56 |
trigvolume_enable trigger_volume_77 0 |
57 |
trigvolume_enable trigger_volume_80 0 |
58 |
trigvolume_enable tv_66 0 |
59 |
#used |
60 |
door_unlock 108 |
61 |
env_show 2010 0 |
62 |
obj_create 20 20 |
63 |
trigvolume_enable gotLSI_tv 0 |
64 |
} |
65 |
|
66 |
func void you_lose(string ai_name) |
67 |
{ |
68 |
fade_out 0 0 0 30 |
69 |
sleep 30 |
70 |
lose |
71 |
} |
72 |
|
73 |
#################################### |
74 |
### SEVERAL TIMES USED FUNCTIONS ### |
75 |
#################################### |
76 |
|
77 |
func void sp_all(void) |
78 |
{ |
79 |
co_message_display = 0 |
80 |
if(save_point eq 2) save_game 2 autosave |
81 |
if(save_point eq 3) save_game 3 autosave |
82 |
if(save_point eq 4) save_game 4 autosave |
83 |
if(save_point eq 5) save_game 5 autosave |
84 |
sleep 180 |
85 |
co_message_display = 1 |
86 |
} |
87 |
|
88 |
func void remove_ai(void) |
89 |
{ |
90 |
ai2_kill |
91 |
sleep 60 |
92 |
powerup_reset |
93 |
weapon_reset |
94 |
sleep 240 |
95 |
corpse_reset |
96 |
} |
97 |
|
98 |
func void music_stop(void) |
99 |
{ |
100 |
#training |
101 |
sound_music_stop atm_gr06 |
102 |
sound_music_stop atm_ft68 |
103 |
#warehoue |
104 |
sound_music_volume mus_ambgrv1 0.0 2.0 |
105 |
sound_music_stop mus_ambgrv1 |
106 |
sound_music_stop atm_low1 |
107 |
sound_music_volume mus_chase 0.0 3.0 |
108 |
sound_music_stop mus_chase |
109 |
} |
110 |
|
111 |
########## |
112 |
### SP1 ### |
113 |
########## |
114 |
|
115 |
func void intro(void) |
116 |
{ |
117 |
playback 0 SwingKonokoSet |
118 |
chr_inv_reset 0 |
119 |
ai2_spawn A_t48 |
120 |
objective_set 1 silent |
121 |
} |
122 |
|
123 |
#tv55 - the complete area of the platform where Konoko starts (no funcs); I've disabled it |
124 |
#lose func of A_t48 (func: t48_dead); I don't use it |
125 |
|
126 |
#console 1 |
127 |
func void unlock6(string ai_name) |
128 |
{ |
129 |
particle d1_locklight01 do start |
130 |
door_unlock 6 |
131 |
target_set 44 30 |
132 |
ai2_spawn A_t50 |
133 |
trigvolume_enable trigger_volume_65 1 |
134 |
} |
135 |
|
136 |
#tv57 - in front of door 6 (entry func: t65; exit func: t65b); I've diabled it |
137 |
|
138 |
### FIRST HALL - GROUND FLOOR ### |
139 |
|
140 |
#tv56 - after door 6 (entry func: t64); I've diabled it |
141 |
#tv72 - right side; in the right corner (entry func: t77); I've diabled it |
142 |
|
143 |
#tv12 - left side; after the box near the left wall |
144 |
func void rat3(void) |
145 |
{ |
146 |
particle rat3 pulse |
147 |
} |
148 |
|
149 |
#tv11 - in front of door 16; right side; around the small drum |
150 |
func void bug0(void) |
151 |
{ |
152 |
particle bug0 pulse |
153 |
} |
154 |
|
155 |
### FIRST HALL - FIRST FLOOR ### |
156 |
|
157 |
#console 2 |
158 |
func void unlock1(string ai_name) |
159 |
{ |
160 |
particle lock1_locklight01 do start |
161 |
door_unlock 15 |
162 |
door_unlock 16 |
163 |
target_set 33 15 |
164 |
sleep 120 |
165 |
ai2_spawn Bay1_Thug_1 |
166 |
} |
167 |
|
168 |
### FIRST HALL - SECOND FLOOR ### |
169 |
|
170 |
#tv74 - on the top of the crane cabin |
171 |
func void t02(string ai_name) |
172 |
{ |
173 |
ai2_spawn secret2 |
174 |
ai2_dopath A_t50 patrol_secret1 |
175 |
ai2_setjobstate A_t50 |
176 |
fork health_check |
177 |
} |
178 |
|
179 |
func void health_check(void) |
180 |
{ |
181 |
chr_wait_health secret2 0 |
182 |
train_fathealth |
183 |
} |
184 |
|
185 |
#tv58 - in front of door 4 (entry func: t01); I've disabled it |
186 |
|
187 |
### SECOND HALL - GROUND FLOOR ### |
188 |
|
189 |
#tv80 - the complete volume of the hall (no funcs); I've disabled it |
190 |
|
191 |
#tv1 - high box after door 16 and door 15 |
192 |
func void intro_enemies(string ai_name) |
193 |
{ |
194 |
ai2_spawn Bay2_Thug_1 |
195 |
ai2_spawn Bay2_Thug_2 |
196 |
sound_music_start mus_ambgrv1 0 |
197 |
sound_music_volume mus_ambgrv1 0.75 3.0 |
198 |
} |
199 |
|
200 |
#lose func of Bay2_Thug_1 |
201 |
func void train_fathealth(string ai_name) |
202 |
{ |
203 |
if(var_counter eq 0) |
204 |
{ |
205 |
var_counter = 1 |
206 |
sleep 90 |
207 |
sound_dialog_play c00_01_93shinatama |
208 |
sound_dialog_play_block pause |
209 |
sleep 40 |
210 |
sound_dialog_play c00_01_94shinatama |
211 |
} |
212 |
} |
213 |
|
214 |
#tv19 - after one third of the hall; from left to right; ends right in some distance in front of door 18 |
215 |
func void rat1(void) |
216 |
{ |
217 |
particle rat1 pulse |
218 |
} |
219 |
|
220 |
#tv13 - after door 18 |
221 |
func void bug8(void) |
222 |
{ |
223 |
particle bug8 pulse |
224 |
} |
225 |
|
226 |
#console 3 |
227 |
func void unlock2(string ai_name) |
228 |
{ |
229 |
particle lock2_locklight01 do start |
230 |
door_unlock 24 |
231 |
door_unlock 26 |
232 |
target_set 84 15 |
233 |
music_stop |
234 |
} |
235 |
|
236 |
#tv4 - in front of door 26 and door 24 (entry func: setup_bay3); I've disabled it |
237 |
|
238 |
### SECOND HALL - FIRST FLOOR ### |
239 |
|
240 |
#nothing here; no second floor |
241 |
|
242 |
### THIRD HALL - GROUND FLOOR ### |
243 |
|
244 |
#tv15 - after door 26; right side; in front of the first box |
245 |
func void rat6(void) |
246 |
{ |
247 |
particle rat6 pulse |
248 |
} |
249 |
|
250 |
#tv14 - next to tv15; in front of the second box |
251 |
func void bug4(void) |
252 |
{ |
253 |
particle bug4 pulse |
254 |
} |
255 |
|
256 |
#tv16 - in some distance after door 31 |
257 |
func void rat4(void) |
258 |
{ |
259 |
particle rat4 pulse |
260 |
} |
261 |
|
262 |
### THIRD HALL - FIRST FLOOR ### |
263 |
|
264 |
#tv5 - around Chung |
265 |
func void Chung(void) |
266 |
{ |
267 |
sound_music_start atm_low1 0.7 |
268 |
trigvolume_enable gotLSI_tv 1 |
269 |
target_set 1 0 |
270 |
} |
271 |
|
272 |
#tv30 - around the lsi |
273 |
func void checkLSI(string ai_name) |
274 |
{ |
275 |
trigvolume_enable gotLSI_tv 0 |
276 |
if(chr_has_lsi(0) eq 1) |
277 |
{ |
278 |
particle lock3_locklight01 do start |
279 |
door_unlock 37 |
280 |
music_stop |
281 |
ai2_spawn Ambush_Striker_1 |
282 |
ai2_spawn Mid_Thug_1 |
283 |
ai2_spawn Mid_Thug_2 |
284 |
objective_set 2 silent |
285 |
target_set 7053 30 |
286 |
var_counter = 0 |
287 |
} |
288 |
if(chr_has_lsi(0) eq 0) |
289 |
{ |
290 |
sleep 60 |
291 |
trigvolume_enable gotLSI_tv 1 |
292 |
} |
293 |
} |
294 |
|
295 |
### THIRD HALL - SECOND FLOOR ### |
296 |
|
297 |
#tv75 - in front of door 32 |
298 |
func void t05(string ai_name) |
299 |
{ |
300 |
ai2_spawn ambush_striker |
301 |
} |
302 |
|
303 |
########## |
304 |
### SP2 ### |
305 |
########## |
306 |
|
307 |
#tv59 - after door 37 |
308 |
func void s2(string player_name) |
309 |
{ |
310 |
if(save_point eq 3) |
311 |
{ |
312 |
ai2_spawn Mid_Thug_1 |
313 |
ai2_spawn Mid_Thug_2 |
314 |
objective_set 2 silent |
315 |
target_set 7053 30 |
316 |
} |
317 |
else save_game 3 autosave |
318 |
} |
319 |
|
320 |
#tv76 - in front of door 36 |
321 |
func void t09(string ai_name) |
322 |
{ |
323 |
target_set 62 30 |
324 |
} |
325 |
|
326 |
#tv63 - after door 35 |
327 |
func void t07(string ai_name) |
328 |
{ |
329 |
ai2_spawn Top_Thug_5 |
330 |
} |
331 |
|
332 |
#tv64 - after door 34; near the end of the way; near the corner of the left wall |
333 |
func void t69(string ai_name) |
334 |
{ |
335 |
ai2_spawn Top_Striker_1 |
336 |
ai2_spawn Top_Comguy_1 |
337 |
ai2_spawn Top_Thug_3 |
338 |
} |
339 |
|
340 |
#tv6 - in front of door 61 |
341 |
func void spawn_mid2(string ai_name) |
342 |
{ |
343 |
ai2_spawn Mid2_Striker_1 |
344 |
ai2_spawn Mid2_Striker_2 |
345 |
target_set 66 15 |
346 |
} |
347 |
|
348 |
#console 5 |
349 |
func void unlock4(string ai_name) |
350 |
{ |
351 |
particle lock4_locklight01 do start |
352 |
door_unlock 65 |
353 |
target_set 7054 15 |
354 |
} |
355 |
|
356 |
########## |
357 |
### SP3 ### |
358 |
########## |
359 |
|
360 |
#tv62 - after door 65 (entry func: s3); I've disabled it |
361 |
|
362 |
#tv2 - after door 65; nearly at the same position as tv62 |
363 |
func void train_alarm(string ai_name) |
364 |
{ |
365 |
if(save_point eq 4) |
366 |
{ |
367 |
objective_set 2 silent |
368 |
target_set 7054 15 |
369 |
} |
370 |
else |
371 |
{ |
372 |
fork remove_ai |
373 |
save_game 4 autosave |
374 |
door_lock 60 |
375 |
} |
376 |
ai2_spawn Bay4_Comguy_1 |
377 |
} |
378 |
|
379 |
### FIRST HALL - GROUND FLOOR ### |
380 |
|
381 |
#tv18 - in front of door 68 |
382 |
func void rat5(void) |
383 |
{ |
384 |
particle rat5 pulse |
385 |
} |
386 |
|
387 |
#console 7 ==> see second floor |
388 |
|
389 |
### FIRST HALL - FIRST FLOOR ### |
390 |
|
391 |
#hit func of Bay4_Comguy_1 |
392 |
func void hurt1(string ai_name) |
393 |
{ |
394 |
ai2_makeignoreplayer Bay4_Comguy_1 1 |
395 |
ai2_doalarm Bay4_Comguy_1 6 |
396 |
ai2_dopath Bay4_Comguy_1 Run_To_Alarm |
397 |
ai2_setjobstate Bay4_Comguy_1 |
398 |
sleep 60 |
399 |
sound_dialog_play c00_01_96shinatama |
400 |
} |
401 |
|
402 |
func void patrolscript0001(string ai_name) |
403 |
{ |
404 |
ai2_doalarm Bay4_Comguy_1 6 |
405 |
} |
406 |
|
407 |
### FIRST HALL - SECOND FLOOR ### |
408 |
|
409 |
#console 7 |
410 |
func void unlock5(string ai_name) |
411 |
{ |
412 |
particle lock4_locklight01 do stop |
413 |
door_lock 65 |
414 |
particle lock5_locklight01 do start |
415 |
door_unlock 73 |
416 |
door_unlock 74 |
417 |
door_unlock 81 |
418 |
door_unlock 82 |
419 |
target_set 72 30 |
420 |
console_deactivate 7 |
421 |
var_counter = 1 |
422 |
} |
423 |
|
424 |
#tv7 - in front of console 6 (entry func: alarm_warning; exit func: alarm_warningb); I've disabled it |
425 |
|
426 |
#console 6 |
427 |
func void alarm_trig(string ai_name) |
428 |
{ |
429 |
fork do_alarm_sound |
430 |
if(var_counter eq 0) unlock5 |
431 |
ai2_makeignoreplayer Bay4_Comguy_1 0 |
432 |
ai2_dopath Bay4_Comguy_1 patrol_42 |
433 |
ai2_setjobstate Bay4_Comguy_1 |
434 |
ai2_spawn Alarm_Bay4_Striker_1 |
435 |
chr_teleport Alarm_Bay4_Striker_1 7033 |
436 |
ai2_attack Alarm_Bay4_Striker_1 char_0 |
437 |
ai2_spawn Alarm_Bay4_Striker_2 |
438 |
chr_teleport Alarm_Bay4_Striker_2 7033 |
439 |
ai2_attack Alarm_Bay4_Striker_2 char_0 |
440 |
} |
441 |
|
442 |
func void do_alarm_sound(void) |
443 |
{ |
444 |
sound_ambient_start alarm_loop |
445 |
sleep 900 |
446 |
sound_ambient_stop alarm_loop |
447 |
} |
448 |
|
449 |
#console 4 (func: unlock_alarm); I've disabled it |
450 |
|
451 |
### SECOND HALL - GROUND FLOOR ### |
452 |
|
453 |
#tv31 - high box after door 73 and door 74 |
454 |
func void t47(string ai_name) |
455 |
{ |
456 |
ai2_spawn Bay5_Thug_1 |
457 |
ai2_spawn Bay5_Thug_2 |
458 |
} |
459 |
|
460 |
### SECOND HALL - FIRST FLOOR ### |
461 |
|
462 |
#nothing, no second floor |
463 |
|
464 |
### THIRD HALL - GROUND FLOOR ### |
465 |
|
466 |
#tv32 - after door 81 |
467 |
func void spawn_bay6_bot(string ai_name) |
468 |
{ |
469 |
trigvolume_enable spawn_bay6_top_tv 0 |
470 |
ai2_spawn Bay6_Striker_1b |
471 |
ai2_spawn Bay6_Neutral_1b |
472 |
ai2_spawn Bay6_Neutral_2 |
473 |
ai2_spawn guard1 |
474 |
train_neutral |
475 |
} |
476 |
|
477 |
func void train_neutral(string ai_name) |
478 |
{ |
479 |
target_set 92 15 |
480 |
sound_dialog_play c00_01_97shinatama |
481 |
} |
482 |
|
483 |
### THIRD HALL - FIRST FLOOR ### |
484 |
|
485 |
#tv60 - complete volume of the first floor (no funcs); I've disabled it |
486 |
|
487 |
#tv3 - after door 82 |
488 |
func void spawn_bay6_top(string ai_name) |
489 |
{ |
490 |
trigvolume_enable spawn_bay6_bot_tv 0 |
491 |
ai2_spawn Bay6_Striker_1 |
492 |
ai2_spawn Bay6_Neutral_1 |
493 |
ai2_spawn Bay6_Neutral_2 |
494 |
ai2_spawn guard1 |
495 |
train_neutral |
496 |
} |
497 |
|
498 |
#tv79 - after door 87 |
499 |
func void t10(string ai_name) |
500 |
{ |
501 |
ai2_makeignoreplayer Bay6_Neutral_1 1 |
502 |
ai2_makeignoreplayer Bay6_Neutral_1b 1 |
503 |
ai2_dopath Bay6_Neutral_1 Bay6_Thug_1 |
504 |
ai2_dopath Bay6_Neutral_1b Bay6_Thug_1_copy |
505 |
sleep 240 |
506 |
ai2_makeignoreplayer Bay6_Neutral_1 0 |
507 |
ai2_makeignoreplayer Bay6_Neutral_1b 0 |
508 |
} |
509 |
|
510 |
### THIRD HALL - SECOND FLOOR ### |
511 |
|
512 |
#tv61 - after door 88 |
513 |
func void t67(string ai_name) |
514 |
{ |
515 |
chr_changeteam guard1 Syndicate |
516 |
} |
517 |
|
518 |
#neutral func of Bay6_Neutral_2 |
519 |
func void gotoconsole(string ai_name) |
520 |
{ |
521 |
console_activate 9 |
522 |
sleep 7 |
523 |
ai2_doalarm Bay6_Neutral_2 9 |
524 |
sleep 180 |
525 |
trigvolume_enable trigger_volume_06 1 |
526 |
} |
527 |
|
528 |
#tv77 - around console 9 (exit func: t06); I've disabled it |
529 |
|
530 |
#console 9 |
531 |
func void open_warehouse(string ai_name) |
532 |
{ |
533 |
if(save_point eq 4) |
534 |
{ |
535 |
particle lock7_locklight01 do start |
536 |
door_unlock 86 |
537 |
ai2_spawn Final_Thug_1 |
538 |
ai2_spawn Final_Thug_2 |
539 |
ai2_spawn Final_Thug_3 |
540 |
ai2_spawn Final_Thug_5 |
541 |
ai2_dopath Bay6_Neutral_2 Open_Warehouse |
542 |
ai2_setjobstate Bay6_Neutral_2 |
543 |
objective_set 3 silent |
544 |
target_set 93 15 |
545 |
} |
546 |
particle bigdoor_locklight02 do start |
547 |
ai2_spawn WH_Thug_A |
548 |
ai2_dopath WH_Thug_A WH_Thug_A |
549 |
ai2_setjobstate WH_Thug_A |
550 |
ai2_spawn WH_Striker_B |
551 |
ai2_dopath WH_Striker_B WH_Striker_B |
552 |
ai2_setjobstate WH_Striker_B |
553 |
ai2_spawn WH_Striker_C |
554 |
ai2_spawn WH_Striker_D |
555 |
ai2_dopath WH_Striker_D WH_Striker_D |
556 |
ai2_setjobstate WH_Striker_D |
557 |
} |
558 |
|
559 |
#tv8 - in front of door 48 (entry func: train_timer); I've diabled it |
560 |
|
561 |
########## |
562 |
### SP4 ### |
563 |
########## |
564 |
|
565 |
#tv73 - after door 48 |
566 |
func void s4(string ai_name) |
567 |
{ |
568 |
if(save_point eq 5) open_warehouse |
569 |
else save_game 5 autosave |
570 |
objective_set 4 silent |
571 |
target_set 96 15 |
572 |
sleep 1 |
573 |
timer_start 180 you_lose |
574 |
sound_music_start mus_chase 0 |
575 |
sound_music_volume mus_chase 0.50 1.0 |
576 |
sound_dialog_play c00_01_95shinatama |
577 |
sound_dialog_play_block pause |
578 |
sound_music_volume mus_chase 0.75 1.0 |
579 |
} |
580 |
|
581 |
#tv17 - after door 48; right next to the box at 10 past 12 |
582 |
func void rat2(void) |
583 |
{ |
584 |
particle rat2 pulse |
585 |
} |
586 |
|
587 |
#tv9 - after door 56 |
588 |
func void stair1_target(string ai_name) |
589 |
{ |
590 |
target_set 31 15 |
591 |
} |
592 |
|
593 |
#tv10 - in front of door 58 |
594 |
func void stair2_target(string ai_name) |
595 |
{ |
596 |
target_set 81 15 |
597 |
} |
598 |
|
599 |
#tv71 - big box around console 8 (no funcs); I've disabld it |
600 |
#tv65 - not so big box around console 8 (inside func: t70); I've disabld it |
601 |
|
602 |
#lose func of WH_Striker_C |
603 |
func void end_striker(string ai_name) |
604 |
{ |
605 |
music_stop |
606 |
} |
607 |
|
608 |
#console 8 |
609 |
func void end_console(string ai_name) |
610 |
{ |
611 |
timer_stop |
612 |
fade_out 0 0 0 30 |
613 |
sleep 30 |
614 |
win |
615 |
} |
616 |
|
617 |
##################### |
618 |
### TEXT CONSOLES ### |
619 |
##################### |
620 |
|
621 |
func void console_evidence1(string ai_name) |
622 |
{ |
623 |
text_console level_1a |
624 |
console_reset 19 |
625 |
} |
626 |
|
627 |
func void console_evidence2(string ai_name) |
628 |
{ |
629 |
text_console level_1b |
630 |
console_reset 20 |
631 |
} |