source: nikanabo/current/bsl/original/IGMD/neuro/neuro_level_logic.bsl@ 608

Last change on this file since 608 was 185, checked in by geyser, 18 years ago
File size: 21.1 KB
Line 
1# neuro_spawn_guards.bsl
2#
3# SCRIPTS TO SPAWN SECURITY GUARDS
4#
5
6################# START GAME LOGIC #############################
7
8# creates counterS for stuff
9var int neuro_counter;
10var int kerr_counter;
11var int has_probed = 0;
12var int ambush_counter = 2;
13var int final_check = 0;
14var int FTS_variable = 2;
15
16func void level_start(void)
17{
18# set counter values
19
20 neuro_counter = 3
21 end_counter = 2
22 kerr_counter = 3
23
24 ############# SAVE GAME SCRIPTS #############
25
26# These functions are used when the game is restored.
27
28 if (save_point eq 0)
29 {
30 dprint SAVE_POINT_0
31# VOODOO COMPUTING
32 }
33
34 if (save_point eq 1)
35 {
36 fork Setup_Intro
37 fork set_objective_1
38 dprint Restore_Autosave_Point_1
39 restore_game
40 }
41
42 if (save_point eq 2)
43 {
44 dprint Restore_Autosave_Point_2
45
46 objective_set 1 silent
47 target_set(1261, 30.0)
48
49 dprint Restore_Pod_1
50 ai2_spawn Pod1_TCL_1
51 ai2_spawn Pod1_TCL_2
52 ai2_spawn Pod1_TCL_3
53 ai2_spawn Pod1_Scientist_1
54 ai2_spawn Pod1_Scientist_2
55 #particle lock1_locklight01 do start
56 door_lock(11);
57 trigvolume_enable(autosave_trigger_1, 0);
58
59 restore_game
60
61# console_deactivate 10
62# trigvolume_enable(trig_train_saves, 0);
63# trigvolume_enable(trig_train_objectives, 1);
64 }
65
66 if (save_point eq 3)
67 {
68 dprint RESTORE_SAVE_POINT_3
69
70 objective_set 2 silent
71 target_set(366, 30.0)
72
73 particle lock3_locklight02 do start
74 particle lock4_locklight02 do start
75
76 door_unlock(58);
77
78 door_lock(32);
79 door_lock(33);
80 door_lock(34);
81 door_lock(35);
82
83 trig_deactivate 2
84
85 trigvolume_enable(trigger_volume_76, 0);
86 trigvolume_enable(trigger_volume_06, 1);
87 trigvolume_enable(Kerr_trig, 0);
88 console_deactivate 12
89 console_deactivate 13
90
91 restore_game
92
93 kerr_console_music
94 }
95
96 if (save_point eq 4)
97 {
98 dprint RESTORE_SAVE_POINT_4
99
100 env_show 823 0
101
102 objective_set 3 silent
103 target_set(346, 30.0)
104
105 door_lock 58
106
107 door_unlock(1);
108 door_unlock(6);
109 door_unlock(7);
110
111 particle lock5a_locklight01 do start
112 particle lock5b_locklight01 do start
113 particle lock5c_locklight01 do start
114
115 particle labalarm1_emlight01 do stop
116 particle labalarm2_emlight01 do stop
117 particle labalarm3_emlight01 do stop
118
119 particle labalarm1 do stop
120 particle labalarm2 do stop
121 particle labalarm3 do stop
122
123 particle lock6_locklight02 do start
124
125 trigvolume_enable(trigger_volume_13, 0);
126 trigvolume_enable(spawn_kerr_trig, 0);
127 #trigvolume_enable(Setup_Security_Trig, 1);
128 #trigvolume_enable(chase_trigger, 1);
129
130 # CB: set up the monologue for konoko telling herself about her next objective
131 prepare_vat_monologue();
132
133 console_deactivate 3
134 console_deactivate 4
135 console_deactivate 5
136 console_deactivate 14
137 console_deactivate 88
138
139 ai2_spawn Scan_BOS_1
140 ai2_spawn Scan_BOS_2
141 ai2_spawn Scan_BOS_3
142 ai2_spawn Scan_BOS_4
143
144 ai2_spawn CS_ScanOps01
145
146 restore_game
147
148 post_scan_music_start
149 }
150}
151
152# This is an example of a save game console.
153
154func void autosave_1(string player_name)
155{
156 dprint autosave_1
157# PLAY AUTOSAVE SOUND - ADD LATER!!!
158 save_game 2 autosave
159}
160
161func void save_point_2(string player_name)
162{
163 dprint saveit_2
164 save_game 3 autosave
165}
166
167func void save_point_3(string player_name)
168{
169 dprint saveit_3
170 save_game 4 autosave
171}
172
173########################################################
174
175func void start_trap_music(string ai_name)
176{
177 dprint martys_baby
178 sound_music_start mus_space01 0.8
179}
180
181func void Die_For_Kerr_1(string ai_name)
182{
183 dprint DFK_1
184 kerr_counter = kerr_counter - 1
185
186 if (kerr_counter eq 0)
187 {
188 Kerr_Console_All_Counters();
189 }
190}
191
192func void Die_For_Kerr_2(string ai_name)
193{
194 dprint DFK_2
195 kerr_counter = kerr_counter - 1
196
197 if (kerr_counter eq 0)
198 {
199 Kerr_Console_All_Counters();
200 }
201}
202
203func void Die_For_Kerr_3(string ai_name)
204{
205 dprint DFK_3
206 kerr_counter = kerr_counter - 1
207
208 if (kerr_counter eq 0)
209 {
210 Kerr_Console_All_Counters();
211 }
212}
213
214func void Kerr_Console_All_Counters(void)
215{
216 dprint START_KERR
217 trigvolume_enable(Kerr_trig, 1);
218 fork Pod3_Unlock_Doors
219}
220
221func void Setup_Intro(string ai_name)
222{
223# SETUP POD 1 AREA
224 dprint Setup_Intro
225 trig_activate 1
226 particle lock99_locklight02 do start
227 particle lock100_locklight01 do stop
228
229 door_unlock 11
230}
231
232func void Setup_Pod1(string ai_name)
233{
234# SETUP POD 1 AREA
235 dprint SetupPod1
236
237 door_lock 20
238 door_lock 21
239 door_lock 22
240 door_lock 23
241
242 ai2_spawn Pod1_TCL_1
243 ai2_spawn Pod1_TCL_2
244 ai2_spawn Pod1_TCL_3
245 ai2_spawn Pod1_Scientist_1
246 ai2_spawn Pod1_Scientist_2
247
248 particle lock1_locklight01 do stop
249 #particle lock1_locklight01 do start
250 sound_music_stop mus_space01
251}
252#########################################
253func void Pod1_RTAlarm_A(string ai_name)
254{
255 dprint Guard_A_RTAlarm
256 ai2_doalarm Pod1_TCL_1 10
257}
258
259func void Pod1_RTAlarm_B(string ai_name)
260{
261 dprint Guard_B_RTAlarm
262 ai2_doalarm Pod1_TCL_2 10
263}
264#########################################
265
266func void Pod1_Alarm_Sound(void)
267{
268 sound_ambient_start alarm_loop
269 sleep 900
270 sound_ambient_stop alarm_loop
271}
272
273func void Pod1_Alarm(string ai_name)
274{
275 dprint Pod1Alarm
276 door_unlock(11);
277 particle lock99_locklight02 do start
278 sleep 180
279# SPAWN ALARM CHARACTERS
280 ai2_spawn Pod1_BOL_Alarm_1
281 ai2_spawn Pod1_BOL_Alarm_2
282 ai2_spawn pod1_a_1
283 ai2_spawn pod1_a_2
284# SET ALERT LEVELS
285 ai2_setalert Pod1_TCL_1 high
286 ai2_setalert Pod1_TCL_2 high
287 ai2_setalert Pod1_TCL_3 high
288 ai2_setalert Pod1_BOL_Alarm_1 high
289 ai2_setalert Pod1_BOL_Alarm_2 high
290# EXECUTE ALARM PATHS
291 ai2_dopath Pod1_TCL_1 Pod1_Final_Guard_A
292 ai2_dopath Pod1_TCL_2 Pod1_Final_Guard_B
293 ai2_dopath Pod1_TCL_3 Pod1_Final_Guard_C
294 ai2_dopath Pod1_Scientist_1 Pod1_Final_Sci_A
295 ai2_dopath Pod1_Scientist_2 Pod1_Final_Sci_B
296# MAKE ALARM PATHS THEIR JOBS
297 ai2_setjobstate Pod1_TCL_1
298 ai2_setjobstate Pod1_TCL_2
299 ai2_setjobstate Pod1_TCL_3
300
301 ai2_setjobstate Pod1_Scientist_1
302 ai2_setjobstate Pod1_Scientist_2
303
304# TRIP ALARM FOR BADDIES TO PURSUE KONOKO
305
306 ai2_tripalarm 11 Konoko
307
308 particle lock1_locklight01 do stop
309
310 particle alarm1_emlight01 do start
311
312# DOOR LOCK COMMAND
313 door_lock 20
314 door_lock 21
315 door_lock 22
316 door_lock 23
317
318# annoy the player with alarm sound
319 fork Pod1_Alarm_Sound
320
321 console_reset 1
322}
323
324# UNLOCK DOORS FROM CONSOLE
325func void Pod1_UnlockDoors(string ai_name)
326{
327 dprint Pod1UnlockDoors
328
329 door_unlock 20
330 door_unlock 21
331 door_unlock 22
332 door_unlock 23
333 door_lock(11);
334 particle lock99_locklight02 do stop
335
336 input 0
337 cm_interpolate lock1 0
338 sleep 30
339 particle alarm1_emlight01 do stop
340 sleep 30
341 particle lock1_locklight01 do start
342 sleep 150
343 cm_reset
344 input 1
345
346 console_reset 10
347}
348###################### POD 2 #################################
349func void Pod2_Setup(string ai_name)
350{
351 dprint SetupPod2
352 ai2_spawn Pod2_TCL_1
353 ai2_spawn Pod2_TCL_2
354 ai2_spawn Pod2_Sci_1
355
356 particle lock2_locklight01 do stop
357}
358##############################################################
359func void Pod2_RTAlarm_A(string ai_name)
360{
361 dprint Guard_A_RTAlarm
362 ai2_doalarm Pod2_TCL_1 11
363}
364
365func void Pod2_RTAlarm_B(string ai_name)
366{
367 dprint Guard_B_RTAlarm
368 ai2_doalarm Pod2_TCL_2 11
369}
370##############################################################
371
372func void Pod2_Alarm_Sound(void)
373{
374 sound_ambient_start alarm_loop
375 sleep 900
376 sound_ambient_stop alarm_loop
377}
378
379func void Pod2_Alarm(string ai_name)
380{
381 dprint Pod2Alarm
382 door_unlock(11);
383 particle lock99_locklight02 do start
384 sleep 180
385
386# SPAWN ALARM CHARACTERS
387 #ai2_spawn Pod2_BOS_1
388 ai2_spawn Pod2_BOL_Alarm_1
389 ai2_spawn pod2_a_1
390 ai2_spawn pod2_a_2
391
392# SET ALERT LEVELS
393 ai2_setalert Pod2_TCL_1 high
394 ai2_setalert Pod2_TCL_2 high
395 ai2_setalert Pod2_BOS_1 high
396
397# EXECUTE ALARM PATHS
398 ai2_dopath Pod2_TCL_1 Pod2_End_TCL_1
399 ai2_dopath Pod2_TCL_2 Pod2_End_TCL_2
400 ai2_dopath Pod2_BOS_1 Pod2_End_BOS_1
401 ai2_dopath Pod2_Sci_1 Pod2_End_Sci_1
402
403# MAKE ALARM PATHS THEIR JOBS
404 ai2_setjobstate Pod2_TCL_1
405 ai2_setjobstate Pod2_TCL_2
406 ai2_setjobstate Pod2_BOS_1
407
408 ai2_setjobstate Pod2_Sci_1
409
410# TRIP ALARM FOR BADDIES TO PURSUE KONOKO
411
412 ai2_tripalarm 12 Konoko
413
414 particle lock2_locklight01 do stop
415
416 particle alarm2_emlight01 do start
417
418# DOOR LOCK COMMANDS
419 door_lock 28
420 door_lock 29
421 door_lock 30
422 door_lock 31
423
424 console_reset 2
425
426 fork Pod2_Alarm_Sound
427}
428
429# UNLOCK DOORS FROM CONSOLE
430
431func void Pod2_UnlockDoors(string ai_name)
432{
433 dprint Pod2UnlockDoors
434
435 door_unlock 28
436 door_unlock 29
437 door_unlock 30
438 door_unlock 31
439 door_lock(11);
440 particle lock99_locklight02 do stop
441
442 input 0
443 cm_interpolate lock2 0
444 sleep 30
445 particle alarm2_emlight01 do stop
446 sleep 30
447 particle lock2_locklight01 do start
448 sleep 150
449 cm_reset
450 input 1
451
452 console_reset 11
453}
454
455func void chase_after_scan(string ai_name)
456{
457 ai2_dopath Scan_BOS_3 chase_after_3
458 ai2_dopath Scan_BOS_4 chase_after_4
459
460 ai2_setjobstate Scan_BOS_3
461 ai2_setjobstate Scan_BOS_4
462
463 ai2_tripalarm 11 Konoko
464
465 sleep 1200
466
467 ai2_dopath Scan_BOS_1 chase_after_1
468 ai2_dopath Scan_BOS_2 chase_after_2
469
470 ai2_setjobstate Scan_BOS_1
471 ai2_setjobstate Scan_BOS_2
472
473 ai2_tripalarm 9 Konoko
474}
475###################### POD 3 #################################
476func void Pod3_Setup(string ai_name)
477{
478 dprint SetupPod3
479 ai2_spawn Pod3_BOS_1
480 ai2_spawn Pod3_BOS_2
481 ai2_spawn Pod3_BOL_1
482
483 #door_lock 59
484
485 trigvolume_enable Kerr_trig 1
486}
487
488func void Pod3_Unlock_Doors(string ai_name)
489{
490 dprint Pod3UnlockDoors
491
492 door_unlock 59
493
494 input 0
495 sleep 90
496 cm_interpolate lock3 0
497 sleep 60
498 particle lock3_locklight01 do start
499 sleep 150
500 cm_reset
501 input 1
502}
503
504func void Kerr_Console(string ai_name)
505{
506 dprint Kerr_Console
507
508 door_unlock 58
509
510 input 0
511 cm_interpolate lock4 0
512 sleep 60
513 particle lock4_locklight02 do start
514 sleep 150
515 trig_deactivate 2
516 sleep 75
517 cm_reset
518 input 1
519}
520
521###################### LAB 1 #################################
522func void Setup_Lab(string ai_name)
523{
524 dprint SetUpLab
525
526 particle lock5_locklight01 do stop
527
528 door_lock 6
529 door_lock 7
530
531 ai2_spawn LabHall_BOL_1
532 ai2_spawn LabHall_BOL_2
533 ai2_spawn LabHall_BOL_3
534 ai2_spawn LabHall_BOL_4
535 ai2_spawn LabHall_BOL_5
536
537 ai2_spawn Hall_TCS_33
538
539 ai2_spawn Lab1_Sci_1
540 ai2_spawn Lab1_Sci_2
541
542 ai2_spawn Lab2_Sci_1
543 ai2_spawn Lab2_Sci_2
544
545 ai2_spawn Lab3_Sci_1
546 ai2_spawn Lab3_Sci_2
547
548 trigvolume_enable Setup_Security_Trig 0
549 trigvolume_enable(chase_trigger, 0);
550}
551
552func void Lab_Console_1(string ai_name)
553{
554 dprint LabConsole1
555
556 #particle create labalarm1_emlight02
557 particle labalarm1 do start
558
559 ai2_spawn lab_BOS_1
560
561 #ai2_spawn lab_BOS_2
562
563 ai2_tripalarm 1 Konoko
564
565 particle lock4_locklight02 do stop
566 door_lock 58
567
568 neuro_counter = neuro_counter - 1
569
570 input 0
571 cm_interpolate lock5 0
572 sleep 60
573 particle lock5a_locklight01 do start
574 sleep 150
575 cm_reset
576 target_set(1009, 30.0)
577 input 1
578
579 if (neuro_counter eq 0)
580 {
581 Lab_Console_All_Counters();
582 }
583}
584
585func void Lab_Console_2(string ai_name)
586{
587 dprint LabConsole2
588
589 particle labalarm2 do start
590
591 ai2_spawn lab_BOS_2
592
593 #ai2_spawn lab_BOS_4
594
595 ai2_tripalarm 1 Konoko
596
597 target_set(268, 30.0)
598
599 particle lock4_locklight02 do stop
600 door_lock 58
601
602 neuro_counter = neuro_counter - 1
603
604 input 0
605 cm_interpolate lock5 0
606 sleep 60
607 particle lock5b_locklight01 do start
608 sleep 150
609 cm_reset
610 target_set(1009, 30.0)
611 input 1
612
613 if (neuro_counter eq 0)
614 {
615 Lab_Console_All_Counters();
616 }
617}
618
619func void Lab_Console_3(string ai_name)
620{
621 dprint LabConsole3
622
623 ai2_spawn lab_BOS_3
624
625 #ai2_spawn lab_BOS_6
626
627 particle labalarm3 do start
628
629 ai2_tripalarm 1 Konoko
630
631 particle lock4_locklight02 do stop
632 door_lock 58
633
634 target_set(367, 30.0)
635
636 neuro_counter = neuro_counter - 1
637
638 input 0
639 cm_interpolate lock5 0
640 sleep 60
641 particle lock5c_locklight01 do start
642 sleep 150
643 cm_reset
644 target_set(1009, 30.0)
645 input 1
646
647 if (neuro_counter eq 0)
648 {
649 Lab_Console_All_Counters();
650 }
651}
652
653func void Lab_Console_All_Counters(void)
654{
655 dprint PROBE_ROOM_OPEN
656 door_unlock 6
657 door_unlock 7
658
659 kerr_console_music_stop
660}
661
662func void Lab_Unlock_Door_5(string ai_name)
663{
664 dprint Probe_Room_Unlock_Doors
665 door_unlock 1
666# CB: no idea what this was, maybe it was the same as the current 66_01
667# sound_dialog_play c13_49a_01konoko
668 input 0
669 cm_interpolate lock6 0
670 sleep 60
671 particle lock6_locklight02 do start
672 sleep 150
673 cm_reset
674 input 1
675
676 trigvolume_enable Setup_Security_Trig 1
677 trigvolume_enable(chase_trigger, 1);
678}
679#######################DURING THE SCAN#########################
680func void Scan_Guards(string ai_name)
681{
682 dprint Scan_Guards
683
684 ai2_spawn Scan_BOS_1
685 ai2_spawn Scan_BOS_2
686 ai2_spawn Scan_BOS_3
687 ai2_spawn Scan_BOS_4
688
689 #chr_teleport LabHall_BOL_1 274
690 #chr_teleport LabHall_BOL_4 275
691
692 chr_teleport LabHall_BOL_5 272
693 chr_teleport Hall_TCS_33 7018
694
695 #chr_teleport LabHall_BOL_2 264
696 #chr_teleport LabHall_BOL_3 7004
697
698 #ai2_forget LabHall_BOL_1
699 #ai2_forget LabHall_BOL_2
700 #ai2_forget LabHall_BOL_3
701 #ai2_forget LabHall_BOL_4
702
703 ai2_forget LabHall_BOL_5
704 ai2_forget Hall_TCS_33
705
706 ai2_dopath LabHall_BOL_1 Scan_BOL_1
707 ai2_dopath LabHall_BOL_2 Scan_BOL_2
708 ai2_dopath LabHall_BOL_3 Scan_BOL_3
709 ai2_dopath LabHall_BOL_4 Scan_BOL_4
710 ai2_dopath LabHall_BOL_5 Scan_BOL_5
711 ai2_dopath Hall_TCS_33 Scan_Hall_TCS_33
712
713 ai2_setjobstate LabHall_BOL_1
714 ai2_setjobstate LabHall_BOL_2
715 ai2_setjobstate LabHall_BOL_3
716 ai2_setjobstate LabHall_BOL_4
717 ai2_setjobstate Hall_TCS_33
718
719 fork get_her
720}
721
722func void get_her(string ai_name)
723{
724 dprint get_her_timer_start
725
726 sleep 18000
727
728 ai2_tripalarm 5 Konoko
729
730 ai2_dopath LabHall_BOL_1 get_her_1
731 ai2_dopath LabHall_BOL_2 get_her_2
732
733 ai2_setjobstate LabHall_BOL_1
734 ai2_setjobstate LabHall_BOL_2
735
736 sleep 18000
737
738 ai2_tripalarm 7 Konoko
739
740 ai2_dopath LabHall_BOL_3 Scan_BOL_3
741 ai2_dopath LabHall_BOL_4 Scan_BOL_4
742
743 ai2_setjobstate LabHall_BOL_3
744 ai2_setjobstate LabHall_BOL_4
745
746 sleep 18000
747
748 ai2_tripalarm 9 Konoko
749
750 ai2_dopath Scan_BOS_1 get_her_1
751 ai2_dopath Scan_BOS_2 get_her_2
752
753 ai2_setjobstate Scan_BOS_1
754 ai2_setjobstate Scan_BOS_2
755
756 sleep 18000
757
758 ai2_tripalarm 11 Konoko
759
760 ai2_dopath Scan_BOS_3 get_her_3
761 ai2_dopath Scan_BOS_4 get_her_4
762
763 ai2_setjobstate Scan_BOS_3
764 ai2_setjobstate Scan_BOS_4
765}
766
767func void endgether(string ai_name)
768{
769 ai2_attack Final_BOL_1 Konoko
770}
771########################### SECURITY #########################
772func void Setup_Security(string ai_name)
773{
774 dprint Setup_Security
775
776 ai2_spawn Sec_BOS_1
777 ai2_spawn Sec_BOS_2
778 ai2_spawn Sec_BOL_1
779
780 trigvolume_enable Ambush_Trigger_1 1
781
782 door_lock 7
783
784 particle lock8_locklight02 do stop
785
786 door_lock 54
787 particle lock7_locklight02 do stop
788
789 post_scan_music_stop
790}
791
792func void Unlock_Door_7(string ai_name)
793{
794 dprint Unlock_Door_7
795
796 door_unlock 54
797
798 input 0
799 cm_interpolate lock7 0
800 sleep 60
801 particle lock7_locklight02 do start
802 sleep 150
803 cm_reset
804 target_set(360, 30.0)
805 input 1
806
807 post_scan_music_stop
808}
809
810func void Sec_Ambush_1(string ai_name)
811{
812 dprint AMBUSH
813 trig_deactivate 3
814 trig_deactivate 4
815 turret_deactivate 2
816 turret_deactivate 3
817
818 door_unlock 7
819 door_unlock 36
820 particle lock8_locklight02 do start
821
822 door_lock 54
823 particle lock7_locklight02 do stop
824
825 ai2_spawn Sec_Ambush_BOS_1
826 ai2_spawn Sec_Ambush_BOL_1
827
828 ai2_attack Sec_Ambush_BOS_1 Konoko
829 ai2_attack Sec_Ambush_BOL_1 Konoko
830
831 #ai2_spawn Sec_Ambush_BOS_2
832 #ai2_spawn Sec_Ambush_BOL_2
833}
834
835
836func void nextwave_1(string ai_name)
837{
838 ambush_counter = ambush_counter - 1
839
840 if (ambush_counter eq 0)
841 {
842 Sec_Ambush_2();
843 }
844}
845
846func void nextwave_2(string ai_name)
847{
848 ambush_counter = ambush_counter - 1
849
850 if (ambush_counter eq 0)
851 {
852 Sec_Ambush_2();
853 }
854}
855
856func void closethedoor(string ai_name)
857{
858 door_lock 7
859 door_lock 36
860
861 particle lock8_locklight02 do stop
862}
863
864func void Sec_Ambush_2(string ai_name)
865{
866 dprint AMBUSH2
867
868 door_unlock 7
869 door_unlock 36
870
871 particle lock8_locklight02 do start
872
873 ai2_spawn Sec_Ambush_BOS_2
874 ai2_spawn Sec_Ambush_BOL_2
875
876 ai2_attack Sec_Ambush_BOS_2 Konoko
877 ai2_attack Sec_Ambush_BOL_2 Konoko
878}
879
880######################### FINAL #########################
881
882func void Setup_Final(string ai_name)
883{
884 dprint Setup_Final
885
886 ai2_spawn Final_BOS_1
887 ai2_spawn Final_BOL_1
888
889 ai2_spawn Final_Thug_1
890 ai2_spawn Final_Thug_2
891
892 trigvolume_enable end 0
893}
894
895func void end(string ai_name)
896{
897 dprint END
898
899 fork Outro
900
901 ai2_forget Final_BOS_1
902 ai2_forget Final_BOL_1
903 ai2_forget Final_BOL_2
904
905 ai2_forget Sec_Ambush_BOS_1
906 ai2_forget Sec_Ambush_BOS_2
907 ai2_forget Sec_Ambush_BOL_1
908 ai2_forget Sec_Ambush_BOL_1
909
910 ai2_forget Final_Thug_1
911 ai2_forget Final_Thug_2
912
913 ai2_dopath Final_BOS_1 End_BOS_1
914 ai2_dopath Final_BOL_1 End_BOL_1
915 ai2_dopath Final_BOL_2 End_BOL_2
916
917 ai2_dopath Sec_Ambush_BOS_1 End_BOS_1
918 ai2_dopath Sec_Ambush_BOS_2 End_BOS_1
919 ai2_dopath Sec_Ambush_BOL_1 End_BOL_1
920 ai2_dopath Sec_Ambush_BOL_2 End_BOL_1
921
922 ai2_dopath Final_Thug_1 End_Thug_1
923 ai2_dopath Final_Thug_2 End_Thug_1
924
925 ai2_setjobstate Final_BOS_1
926 ai2_setjobstate Final_BOL_1
927 ai2_setjobstate Final_BOL_2
928
929 ai2_setjobstate Sec_Ambush_BOS_1
930 ai2_setjobstate Sec_Ambush_BOS_2
931
932 ai2_setjobstate Sec_Ambush_BOL_1
933 ai2_setjobstate Sec_Ambush_BOL_2
934
935 ai2_setjobstate Final_Thug_1
936 ai2_setjobstate Final_Thug_2
937}
938
939##############################################################
940
941# COUNTDOWN TO FINAL CUTSCENE
942
943func void check_1(string ai_name)
944{
945 dprint circle_squared
946 final_count = final_count - 1
947 if (final_count eq 0)
948 {
949 trigvolume_enable ending 1
950 }
951}
952
953func void check_2(string ai_name)
954{
955 dprint circle_squared
956 final_count = final_count - 1
957 if (final_count eq 0)
958 {
959 trigvolume_enable ending 1
960 }
961}
962
963func void mid_guards(string ai_name)
964{
965 dprint final_guards
966 ai2_spawn Final_BOL_2
967 ai2_spawn Final_Thug_9
968
969 ai2_attack Final_BOL_2 Konoko
970}
971
972func void end_guards(string ai_name)
973{
974 dprint final_guards
975 ai2_spawn end_guard_1
976 ai2_spawn end_guard_2
977 ai2_spawn Final_Thug_10
978}
979
980
981####################################################################
982
983func void set_objective_1(void)
984{
985 dprint set_objective_1
986 objective_set(1)
987 target_set(1261, 30.0)
988}
989
990func void set_objective_2(string chr_index)
991{
992 dprint set_objective_2
993 objective_set(2)
994 target_set(366, 30.0)
995}
996
997func void set_objective_3(string chr_index)
998{
999 dprint set_objective_3
1000 objective_set(3)
1001 target_set(346, 30.0)
1002}
1003
1004func void set_objective_4(string chr_index)
1005{
1006 dprint set_objective_4
1007 objective_set(4)
1008 target_set(222, 30.0)
1009}
1010
1011func void kerr_died(string ai_name)
1012{
1013 if (has_probed eq 0)
1014 {
1015 you_lose();
1016 }
1017}
1018
1019func void you_lose(string ai_name)
1020{
1021 sleep 240
1022 fade_out 0 0 0 180
1023 sleep 240
1024 lose
1025}
1026
1027func void level_14a(void)
1028{
1029 dprint set_text_14a
1030 text_console level_14a
1031 console_reset 12
1032}
1033
1034func void level_14b(void)
1035{
1036 dprint set_text_14b
1037 text_console level_14b
1038 console_reset 6
1039}
1040
1041
1042################## ANIM SCRIPTS ##########################################
1043func void patrolscript0001 (string ai_name)
1044{
1045 playback_block Pod1_TCL_1 alarm1 interp 20
1046}
1047
1048func void patrolscript0002 (string ai_name)
1049{
1050 playback_block Pod1_TCL_2 alarm2 interp 20
1051}
1052
1053func void patrolscript0003 (string ai_name)
1054{
1055 playback_block Pod2_TCL_1 pod2alarm1 interp 20
1056}
1057
1058func void patrolscript0004 (string ai_name)
1059{
1060 playback_block Pod2_TCL_2 pod2alarm2 interp 20
1061}
1062
1063func void patrolscript0009 (string ai_name)
1064{
1065 particle lock99_locklight02 do start
1066 door_unlock 11
1067 sleep 540
1068 particle lock99_locklight02 do stop
1069 door_lock 11
1070}
1071
1072func void patrolscript0010 (string ai_name)
1073{
1074 particle lock99_locklight02 do start
1075 door_unlock 11
1076# WAIT AND RELOCK DOORS
1077 sleep 540
1078 particle lock99_locklight02 do stop
1079 door_lock 11
1080}
1081
1082func void kerr_console_music(void)
1083{
1084 sound_music_start mus_ambgrv2 0.8
1085}
1086
1087func void kerr_console_music_stop(void)
1088{
1089 dprint stopping_kerr_console_music
1090 sound_music_stop mus_ambgrv2
1091}
1092
1093func void post_scan_music_start(void)
1094{
1095 dprint startting posctuscene
1096 sound_music_start mus_xtr1 0.7
1097}
1098
1099func void post_scan_music_stop(void)
1100{
1101 sound_music_stop mus_xtr1
1102}
1103
1104################## VAT MONOLOGUE LOGIC ##########################
1105
1106var int played_vat_monologue = 0;
1107
1108func void prepare_vat_monologue(void)
1109{
1110 trigvolume_enable tv_vat_monologue_1 1
1111 trigvolume_enable tv_vat_monologue_2 1
1112}
1113
1114func void set_vat_monologue_variable(void)
1115{
1116 played_vat_monologue = 1;
1117}
1118
1119func void play_vat_monologue(string ai_name)
1120{
1121 if (played_vat_monologue eq 0)
1122 {
1123 # this is a hack to get around the way that the scripting
1124 # language mistakenly sets variables that are inside an
1125 # if clause that isn't being run
1126 set_vat_monologue_variable();
1127
1128 sleep 90
1129
1130 EndScan();
1131 }
1132}
1133
1134################## END LEVEL LOGIC FOR TRIGGER ###################
1135
1136func void check_outro(string ai_name)
1137{
1138 trigvolume_enable tv_check_outro 0
1139
1140 if(FTS_variable eq 0)
1141 {
1142 if(trigvolume_count (77) eq 0)
1143 {
1144 sleep 120
1145 trigvolume_enable ending 1
1146 trigvolume_enable ending2 1
1147 }
1148 if(trigvolume_count (77) ne 0)
1149 {
1150 sleep 90
1151 trigvolume_enable tv_check_outro 1
1152 }
1153 }
1154 sleep 90
1155 trigvolume_enable tv_check_outro 1
1156}
1157
1158func void final_check_for_crane(string ai_name)
1159{
1160 final_check = final_check + 1
1161}
1162
1163func void FTS(string ai_name)
1164{
1165 FTS_variable = FTS_variable - 1
1166}
Note: See TracBrowser for help on using the repository browser.