source: AE/packages/VanillaBSL/IGMD/lab/lab_level_logic.bsl@ 538

Last change on this file since 538 was 407, checked in by gumby, 15 years ago

rename ahoy

File size: 15.2 KB
RevLine 
[407]1################## RESEARCH LAB LEVEL LOGIC ##########################
2
3################ SCRIPTS BY Hardy AND Joseph #########################
4
5################# START, SAVE & OBJECTIVES ###########################
6
7
8# creates counterS for stuff
9
10var int door_counter=3;
11var int passage_counter=3;
12var int count_dead_end=2;
13
14func void turnoffcompass(string ai_name)
15{
16 target_set(143, 0.0)
17}
18
19func void level_start(string ai_name)
20{
21 dprint func_void_start
22
23 if (my_save_point eq 1)
24 {
25 dprint restore_game_1
26
27 set_objective_1
28
29 ai2_spawn Barabus
30
31 dprint SPAWN_BARABUS
32
33 ai2_attack Barabus konoko
34
35 env_show 10 1
36 env_show 9 1
37 env_show 8 1
38
39 #obj_kill 8 10
40
41 trigvolume_enable save_1_trig 0
42 trigvolume_enable floor1 0
43 trigvolume_enable outside_left 0
44 trigvolume_enable outside_right 0
45 trigvolume_enable outside_back 0
46
47 #chr_animate Barabus STRIKElev3_startle
48 #ai2_setmovementmode Barabus walk
49 #playback Barabus IntroSubboss01
50 playback 0 IntroKonoko01
51
52 sound_music_start mus_main01_hd 0.8
53
54 restore_game
55 }
56
57 if (my_save_point eq 2)
58 {
59 dprint restore_game_2
60
61 set_objective_2_from_save
62
63 dprint restore_game_2_a
64
65 door_lock 43
66
67 dprint restore_game_2_b
68
69 particle lock99_locklight01 do stop
70
71 dprint restore_game_2_c
72
73 spawn_floor1_guards
74
75 dprint restore_game_2_d
76
77 restore_game
78 cm_reset
79 }
80
81 if (my_save_point eq 3)
82 {
83 dprint restore_game_3
84
85 spawn_lobby_tctf
86
87 trigvolume_enable save_3_trig 0
88
89 door_lock 35
90 dprint objective5
91 objective_set(5, silent)
92 target_set(142, 30.0)
93
94 restore_game
95 }
96}
97
98func void you_lose(string ai_name)
99{
100 sleep 240
101 fade_out 0 0 0 180
102 sleep 240
103 lose
104}
105
106func void you_win(int char_index)
107{
108 outro
109 win
110}
111
112func void save_game_1(string ai_name)
113{
114 dprint savegame_1
115 if (my_save_point ne 1)
116 {
117 save_game 1 autosave
118 }
119}
120
121func void save_game_2(string ai_name)
122{
123 dprint savegame_2
124 if (my_save_point ne 2)
125 {
126 save_game 2 autosave
127 }
128}
129
130func void save_game_3(string ai_name)
131{
132 dprint savegame_3
133
134 if (my_save_point ne 3)
135 {
136 save_game 3 autosave
137 }
138}
139
140########### GAME OBJECTIVES ############################3
141
142func void set_objective_1(void)
143{
144 dprint objective_1
145 objective_set(1)
146}
147
148func void set_objective_2_from_save(void)
149{
150 objective_set(2)
151}
152
153func void set_objective_2(string chr_index)
154{
155 sleep 180
156 dprint objective_2
157 objective_set(2)
158 particle lock99_locklight01 do start
159 door_unlock 43
160}
161
162func void set_objective_3(string chr_index)
163{
164 dprint objective_3
165 #sound_dialog_play_block c00_01_20shinatama
166 #sound_dialog_play_block pause
167 objective_set(3)
168 target_set(205, 30.0)
169}
170
171func void set_objective_4(string chr_index)
172{
173 dprint objective_4
174 sound_dialog_play_block c00_01_19shinatama
175 sound_dialog_play_block pause
176 objective_set(4)
177 target_set(110, 30.0)
178}
179
180func void set_objective_5(string chr_index)
181{
182 dprint objective_5
183 #sound_dialog_play_block c00_01_18shinatama
184 #sound_dialog_play_block pause
185 objective_set(5)
186 target_set(142, 30.0)
187}
188
189func void set_objective_6(string chr_index)
190{
191 dprint objective_6
192 sound_dialog_play_block c00_01_22shinatama
193 sound_dialog_play_block pause
194 objective_set(6)
195 target_set(256, 30.0)
196}
197
198func void set_target_4(string chr_index)
199{
200 sound_dialog_play_block c00_01_26shinatama
201 sound_dialog_play_block pause
202 target_set(253, 30.0)
203}
204
205func void set_target_5(string chr_index)
206{
207 sound_dialog_play_block c00_01_28shinatama
208 sound_dialog_play_block pause
209 target_set(254, 30.0)
210}
211
212func void set_target_6(string chr_index)
213{
214 target_set(256, 30.0)
215}
216
217
218### MARTY'S HUGE SACK ###
219
220var int music_counter;
221
222func void music_force_stop(void)
223{
224 sleep 4500
225
226 if (0 ne music_counter)
227 {
228 dprint music_force_stop
229 music_counter = 0
230 all_music_counters
231 }
232}
233
234func void music_script_start(void)
235{
236 music_counter = 2
237}
238
239func void striker_siesta_1(string ai_name)
240{
241 dprint striker_siesta1
242 music_counter = music_counter - 1
243
244 if (music_counter eq 0)
245 {
246 all_music_counters();
247 }
248
249}
250func void striker_siesta_2(string ai_name)
251{
252 dprint striker_siesta2
253 music_counter = music_counter - 1
254
255 if (music_counter eq 0)
256 {
257 all_music_counters();
258 }
259}
260
261func void all_music_counters(void)
262{
263 dprint WHEN_THE_LIGHTS_GO_DOWN_IN_THE_CITY
264
265 sound_music_stop mus_trt
266# sound_music_stop mus_fiteb
267# sound_music_stop mus_asian
268}
269
270
271### TEXT CONSOLES ###
272
273func void level3a(string chr_index)
274{
275 dprint text3a
276 text_console level_3a
277 console_reset 7
278}
279
280func void level3b(string chr_index)
281{
282 dprint text3b
283 text_console level_3b
284 console_reset 6
285}
286
287func void level3c(string chr_index)
288{
289 dprint text3c
290 text_console level_3c
291 console_reset 1
292}
293
294func void level3d(string chr_index)
295{
296 dprint text3d
297 text_console level_3d
298 day_264
299}
300
301
302
303
304### GAMEPLAY PROGRESSION ###
305
306func void tower_lock_1(string chr_index)
307{
308 sound_music_stop mus_main03
309
310 ai2_spawn Tower_MB_1
311 trigvolume_enable towertrig_2 0
312 door_lock 41
313}
314
315func void sapper_damage_on(string chr_index)
316{
317 dprint sapper_dmg_start
318 particle sapper start
319}
320
321func void sapper_damage_off(string chr_index)
322{
323 dprint sapper_dmg_stop
324 particle sapper stop
325}
326
327func void spawn_floor1_guards(string ai_name)
328{
329 dprint spawn_floor1
330 particle lock1_locklight01 do stop
331 particle lockA_locklight01 do start
332 ai2_spawn Floor1_Striker_1
333 ai2_spawn Floor1_Striker_2
334 ai2_spawn Floor1_Sci_1
335 ai2_spawn Floor1_Sci_2
336 ai2_spawn Floor1_Sci_3
337 ai2_spawn Floor1_Sci_4
338
339 set_objective_3
340}
341
342func void spawn_right_patrol(string ai_name)
343{
344 dprint spawn_right_patrol
345 ai2_spawn right_patrol_striker_1
346}
347
348func void spawn_left_patrol(string ai_name)
349{
350 dprint spawn_right_patrol
351 ai2_spawn left_patrol_striker_1
352}
353
354func void spawn_back_patrol(string ai_name)
355{
356 dprint spawn_right_patrol
357 ai2_spawn back_patrol_striker_1
358 ai2_spawn back_patrol_striker_2
359}
360
361func void spawn_floor1_striker_10(string ai_name)
362{
363 dprint spawn_ambush_striker_10
364# trig_activate 1
365 ai2_spawn Floor1_Striker_10
366 ai2_spawn Floor1_Striker_12
367}
368
369func void spawn_floor1_striker_11(string ai_name)
370{
371 dprint spawn_ambush_striker_11
372# trig_activate 1
373 ai2_spawn Floor1_Striker_11
374 ai2_spawn Floor1_Striker_12
375}
376
377func void fake_console(string ai_name)
378{
379 sleep 180
380 dprint fake_console
381
382 door_unlock 2
383 door_unlock 9
384 door_unlock 12
385 door_unlock 15
386 door_unlock 18
387 door_unlock 21
388 door_unlock 24
389 door_unlock 27
390
391 particle lock2_locklight01 do start
392}
393
394func void spawn_floor2_guards(string ai_name)
395{
396 dprint spawn_floor2
397
398 particle lock2_locklight01 do stop
399
400 ai2_spawn Floor2_Striker_2
401 ai2_spawn Floor2_Striker_3
402 ai2_spawn Floor2_Striker_4
403
404 sleep 15
405
406 ai2_spawn Floor2_Striker_1
407 ai2_doalarm Floor2_Striker_1 3
408
409 sleep 15
410
411 ai2_spawn Floor2_Sci_1
412 ai2_spawn Floor2_Sci_2
413 ai2_spawn Floor2_Sci_3
414 ai2_spawn Floor2_Sci_4
415 ai2_spawn Floor2_Sci_5
416
417 trigvolume_enable attack_trigger 0
418}
419
420func void commence_attack(string ai_name)
421{
422 dprint commence_attack
423
424 ai2_setalert Floor2_Striker_2 high
425 ai2_setalert Floor2_Striker_3 high
426 ai2_setalert Floor2_Striker_4 high
427
428 ai2_dopath Floor2_Striker_1 Floor2_Stk_1
429 ai2_dopath Floor2_Striker_2 scram_path
430 ai2_dopath Floor2_Striker_3 attack_path_1
431 ai2_dopath Floor2_Striker_4 attack_path_2
432
433 ai2_setjobstate Floor2_Striker_1
434 ai2_setjobstate Floor2_Striker_2
435 ai2_setjobstate Floor2_Striker_3
436 ai2_setjobstate Floor2_Striker_4
437
438 ai2_attack Floor2_Striker_4 Floor2_Sci_4
439 ai2_attack Floor2_Striker_3 Floor2_Sci_1
440}
441
442func void death_sentence_1(string ai_name)
443{
444 dprint death_sentence_1
445 ai2_attack Floor2_Striker_4 Floor2_Sci_5
446}
447
448func void death_sentence_2(string ai_name)
449{
450 dprint death_sentence_2
451 ai2_attack Floor2_Striker_3 Floor2_Sci_2
452}
453
454func void death_sentence_3(string ai_name)
455{
456 dprint death_sentence_2
457 ai2_attack Floor2_Striker_3 Floor2_Sci_3
458}
459
460func void spawn_floor3_guards(string ai_name)
461{
462 dprint spawn_floor3
463
464 ai2_spawn Floor3_Striker_1
465 ai2_spawn Floor3_Striker_2
466 ai2_spawn Floor3_Striker_3
467 ai2_spawn Floor3_Striker_4
468
469 ai2_spawn Floor3_Comguy_1
470
471 particle lock3_locklight01 do stop
472}
473
474func void spawn_roof_guards(string ai_name)
475{
476 dprint spawn_roof_guards
477
478 ai2_spawn Roof_Striker_1
479 ai2_spawn Roof_Striker_2
480 ai2_spawn Roof_Striker_3
481
482# particle lock3_locklight01 do start
483}
484
485func void roof_surprise(string ai_name)
486{
487 dprint roof_surprise
488 ai2_dopath Roof_Striker_3 Roof_Striker_3b
489 ai2_setjobstate Roof_Striker_3
490}
491
492func void spawn_tower_guards(string ai_name)
493{
494 dprint spawn_tower_guards
495
496 ai2_spawn Tower_Striker_1
497 ai2_spawn Tower_Striker_2
498# particle lock3_locklight01 do start
499}
500
501func void spawn_lobby_tctf(string ai_name)
502{
503 dprint spawn_lobby_guards
504 ai2_spawn Lobby_TCL_1
505 ai2_spawn Lobby_TCL_2
506 ai2_spawn Lobby_TCS_1
507
508# particle lock3_locklight01 do start
509}
510
511func void spawn_lobby_synd(string ai_name)
512{
513 dprint spawn_lobby_attackers
514
515 sleep 600
516
517 ai2_spawn Lobby_Striker_1
518 ai2_spawn Lobby_Striker_2
519 ai2_spawn Lobby_Striker_3
520 ai2_spawn Lobby_Striker_4
521
522 door_lock 35
523
524# particle lock3_locklight01 do start
525}
526
527func void spawn_lively_1(string ai_name)
528{
529 dprint spawn_lively_1
530
531 ai2_spawn lively_striker_1
532}
533
534func void spawn_lively_2(string ai_name)
535{
536 dprint spawn_lively_2
537
538 ai2_spawn lively_striker_2
539}
540
541func void spawn_lively_3(string ai_name)
542{
543 dprint spawn_lively_3
544
545 ai2_spawn lively_striker_3
546 ai2_spawn lively_striker_4
547}
548
549func void spawn_opposite_striker_1(string ai_name)
550{
551 dprint spawn_opposite_1
552
553 ai2_spawn opposite_striker_1
554 trigvolume_enable spawn_opposite_2 0
555}
556
557func void spawn_opposite_striker_2(string ai_name)
558{
559 dprint spawn_opposite_2
560
561 ai2_spawn opposite_striker_2
562 trigvolume_enable spawn_opposite_1 0
563}
564
565func void backdoor(string ai_name)
566{
567 dprint spawn_backdoor_squad
568
569 ai2_spawn backdoor_striker_1
570 ai2_spawn backdoor_striker_3
571}
572
573func void spawn_vats(string ai_name)
574{
575 dprint spawn_vats
576
577 ai2_spawn Vat_Striker_1
578 ai2_spawn Vat_Striker_2
579 ai2_spawn Vat_Striker_3
580 ai2_spawn Vat_Striker_4
581 ai2_spawn Vat_Striker_5
582
583 particle lock4_locklight01 do stop
584 trigvolume_enable final_ambush 0
585 trigvolume_enable outro_volume_1 0
586 door_lock 49
587 door_lock 50
588}
589
590func void gethelp(string ai_name)
591{
592 trigvolume_enable outro_volume_1 1
593 sleep 120
594 door_unlock 49
595 door_unlock 50
596 ai2_attack Ambush_Striker_2 Konoko
597 particle lock177_locklight01 do start
598 sound_music_stop mus_main03
599}
600
601func void final_ambush(string ai_name)
602{
603 dprint spawn_final_ambush
604 ai2_spawn Ambush_Striker_1
605 ai2_spawn Ambush_Striker_2
606}
607
608func void unlock_floor1_doors(string ai_name)
609{
610 dprint unlock_floor1_doors
611
612 trigvolume_enable trigger_volume_10 0
613
614 door_unlock 3
615 door_unlock 8
616 door_unlock 11
617 door_unlock 14
618 door_unlock 17
619 door_unlock 20
620 door_unlock 23
621 door_unlock 26
622
623 if(trigvolume_count(36) eq 0)
624 {
625 input 0
626# begin_cutscene
627 cm_interpolate lock1 0
628 sleep 60
629 particle lock1_locklight01 do start
630 sleep 150
631 cm_interpolate tophint 0
632 sleep 60
633 particle lock4a_locklight01 do start
634 sleep 150
635 cm_reset
636 end_cutscene
637 input 1
638 cm_reset
639# end_cutscene
640 input 1
641 }
642
643 particle lock1_locklight01 do start
644 particle lock4a_locklight01 do start
645
646 door_counter = door_counter - 1
647 if (door_counter eq 0)
648 {
649 unlock_roof();
650 }
651}
652
653func void unlock_floor2_doors(string ai_name)
654{
655 dprint unlock_floor2_doors
656
657 trigvolume_enable attack_trigger 1
658
659 door_unlock 2
660 door_unlock 9
661 door_unlock 12
662 door_unlock 15
663 door_unlock 18
664 door_unlock 21
665 door_unlock 24
666 door_unlock 27
667
668 if(trigvolume_count(37) eq 0)
669 {
670 input 0
671# begin_cutscene
672 cm_interpolate lock2 0
673 sleep 60
674 particle lock2_locklight01 do start
675 sleep 150
676 cm_interpolate tophint 0
677 sleep 60
678 particle lock4b_locklight01 do start
679 sleep 150
680 cm_reset
681 end_cutscene
682 input 1
683 cm_reset
684# end_cutscene
685 input 1
686 }
687
688 particle lock2_locklight01 do start
689 particle lock4b_locklight01 do start
690
691 door_counter = door_counter - 1
692 if (door_counter eq 0)
693 {
694 unlock_roof();
695 }
696
697 sleep 60
698
699 ai2_dopath Floor2_Striker_1 Floor2_Stk_1
700 ai2_setjobstate Floor2_Striker_1
701}
702
703func void unlock_floor3_doors(string ai_name)
704{
705 dprint unlock_floor3_doors
706
707 door_unlock 28
708 door_unlock 22
709 door_unlock 16
710 door_unlock 1
711 door_unlock 10
712 door_unlock 13
713 door_unlock 19
714 door_unlock 25
715
716 if(trigvolume_count(37) eq 0)
717 {
718 input 0
719# begin_cutscene
720 cm_interpolate lock3 0
721 sleep 60
722 particle lock3_locklight01 do start
723 sleep 150
724 cm_interpolate tophint 0
725 sleep 60
726 particle lock4c_locklight01 do start
727 sleep 150
728 cm_reset
729# end_cutscene
730 input 1
731 }
732
733 particle lock3_locklight01 do start
734 particle lock4c_locklight01 do start
735
736 door_counter = door_counter - 1
737 if (door_counter eq 0)
738 {
739 unlock_roof();
740 }
741}
742
743func void unlock_roof(string ai_name)
744{
745 dprint unlock_roof
746 door_unlock 4
747 spawn_roof_guards
748 door_unlock 56
749
750 sound_music_start mus_main03
751}
752
753func void passage_1(string ai_name)
754{
755 dprint unlock_floor1_doors
756
757 input 0
758 cm_interpolate passage 0
759 sleep 60
760 particle lock69a_locklight01 do start
761 sleep 150
762 cm_reset
763 input 1
764
765 passage_counter = passage_counter - 1
766 if (passage_counter eq 0)
767 {
768 unlock_passage();
769 }
770}
771
772func void passage_2(string ai_name)
773{
774 dprint unlock_floor1_doors
775
776 input 0
777 cm_interpolate passage 0
778 sleep 60
779 particle lock69b_locklight01 do start
780 sleep 150
781 cm_reset
782 input 1
783
784 passage_counter = passage_counter - 1
785 if (passage_counter eq 0)
786 {
787 unlock_passage();
788 }
789}
790
791func void passage_3(string ai_name)
792{
793 dprint unlock_floor1_doors
794
795 input 0
796 cm_interpolate passage 0
797 sleep 60
798 particle lock69c_locklight01 do start
799 sleep 150
800 cm_reset
801 input 1
802
803 passage_counter = passage_counter - 1
804 if (passage_counter eq 0)
805 {
806 unlock_passage();
807 }
808}
809
810func void unlock_passage(string ai_name)
811{
812 dprint unlock_passage
813
814 sound_music_start mus_main03 1.0
815
816 door_unlock 48
817 #target_set(256, 0.0)
818}
819
820func void unlock_end_door(string ai_name)
821{
822 dprint unlock_end_door
823
824 door_unlock 56
825
826 trigvolume_enable final_ambush 1
827
828 input 0
829 cm_interpolate lock5 0
830 sleep 60
831 particle lockend_locklight02 do start
832 sleep 150
833 cm_reset
834 input 1
835
836 target_set(52, 30.0)
837 sleep 30
838 ai2_spawn Vat_MB_1
839}
840
841
842func void Lobby_Hurt_TCL_1(string ai_name)
843{
844 dprint Hurt_TCL_1
845 ai2_dopath Lobby_TCL_1 Lobby_Hurt_TCL_1
846}
847
848
849func void Lobby_Hurt_TCL_2(string ai_name)
850{
851 dprint Hurt_TCL_2
852
853 sleep 120
854
855 ai2_dopath Lobby_TCL_2 Lobby_Hurt_TCL_2
856}
857
858
859### MISE EN SCENE ###
860
861
862func void miseenscene_start(string ai_name)
863{
864 dprint scene_start
865 particle scene create
866
867 ai2_spawn scene_thug_1
868 ai2_spawn scene_thug_2
869}
870
871func void miseenscene_stop(string ai_name)
872{
873 dprint scene_stop
874 particle scene kill
875}
876
877func void day_264(string ai_name)
878{
879 dprint day264
880
881 sleep 150
882 particle day264 create
883 particle dayafter create
884 particle dayafter start
885
886 ai2_dopath scene_thug_1 scene_flee_1 1
887 ai2_dopath scene_thug_2 scene_flee_2 1
888
889 sleep 300
890 ai2_spawn arcy
891
892 sleep 1000
893 chr_delete scene_thug_1
894 chr_delete scene_thug_2
895
896 sleep 500
897 chr_delete arcy
898}
Note: See TracBrowser for help on using the repository browser.