source: nikanabo/current/bsl/onilight/IGMD/Airport_III/airport2.bsl@ 1049

Last change on this file since 1049 was 185, checked in by geyser, 18 years ago
File size: 18.2 KB
Line 
1#################
2### VARIABLES ###
3#################
4
5var int var_counter = 0;
6var int var_counter2 = 0;
7
8############
9### MAIN ###
10############
11
12func void main(void)
13{
14gl_fog_red = 0
15gl_fog_blue = 0
16gl_fog_green = 0
17gl_fog_start = .995
18gs_farclipplane_set 5000
19ui_suppress_prompt = 1
20chr_auto_aim_dist = 0
21start
22}
23
24#############
25### START ###
26#############
27
28func void start(string ai_name)
29{
30fork deactivate_stuff
31if(save_point eq 0) save_point = 1
32if(save_point eq 1) fork intro
33if(save_point eq 2) restore_game
34if(save_point eq 3)
35 {
36 restore_game
37 sleep 1
38 if(trigvolume_count(5) eq 0) fork save_point_2
39 }
40if(save_point eq 4) restore_game
41if(save_point eq 5) fork save_point_5
42sleep 5
43fork sp_all
44}
45
46func void deactivate_stuff(void)
47{
48#not used
49trigvolume_enable ratend 0
50trigvolume_enable trigger_volume_03 0
51trigvolume_enable trigger_volume_04 0
52trigvolume_enable trigger_volume_40 0
53trigvolume_enable trigger_volume_41_copy 0
54trigvolume_enable unfinishedbusiness 0
55#used
56door_lock 35
57particle gas2 do stop
58particle gaslight1 do stop
59trig_hide 1
60trig_hide 2
61trig_hide 3
62trig_hide 4
63trigvolume_enable rappel_point 0
64trigvolume_enable trigger_volume_08 1
65trigvolume_enable tripwire 1
66}
67
68func void you_lose(string ai_name)
69{
70fade_out 0 0 0 30
71sleep 30
72lose
73}
74
75####################################
76### SEVERAL TIMES USED FUNCTIONS ###
77####################################
78
79func void sp_all(void)
80{
81co_message_display = 0
82if(save_point eq 1) save_game 1 autosave
83if(save_point eq 2) save_game 2 autosave
84if(save_point eq 3) save_game 3 autosave
85if(save_point eq 4) save_game 4 autosave
86if(save_point eq 5) save_game 5 autosave
87sleep 180
88co_message_display = 1
89}
90
91func void remove_ai(void)
92{
93ai2_kill
94sleep 60
95powerup_reset
96weapon_reset
97sleep 240
98corpse_reset
99}
100
101func void music_stop(void)
102{
103sound_music_stop mus_om03
104sound_music_stop atm_gr09
105sound_music_stop mus_asian
106sound_music_stop atm_cl09
107sound_music_stop mus_space01
108}
109
110#tv43, 46 and 47
111func void fire_damage(string ai_name)
112{
113chr_poison(ai_name, 5, 30, 30);
114}
115
116##########
117### SP1 ###
118##########
119
120func void intro(void)
121{
122playback 0 IntroKonokoSet
123sleep 5
124ai2_spawn Start_Friend_1
125ai2_spawn Start_Striker_5
126ai2_makeaware Start_Striker_5 Start_Friend_1
127particle room1 do start
128sleep 15
129sound_dialog_play c00_01_28shinatama
130sleep 30
131objective_set 1 silent
132target_set 7124 30
133sound_music_start mus_om03
134}
135
136func void patrolscript0200(string char_index)
137{
138playback_block Start_Friend_1 roll fromhere
139ai2_dopath Start_Friend_1 Start_Friend_1b 1
140ai2_setjobstate Start_Friend_1
141}
142
143#tv9 - in the middle of the passage from the start room to the hall
144func void Start1(string char_index)
145{
146ai2_spawn Start_Striker_1
147ai2_spawn Start_Striker_2
148ai2_spawn Start_Comguy_1
149}
150
151#tv11- at the end of the passage
152func void mad_bomber1(string ai_name)
153{
154ai2_spawn mad_bomber1
155sleep 150
156particle bomb1 do explode
157particle squib1a do explode
158particle squib1b do explode
159sleep 60
160particle bomb2 do explode
161particle squib2 do explode
162sleep 30
163particle bomb_damage1 do start
164}
165
166#lose func of Start_Striker_5 and Start_Comguy_1 and Hangar1_A_Striker_3
167func void striker_lullaby_1(string ai_name)
168{
169var_counter = var_counter + 1
170if(var_counter eq 2)
171 {
172 music_stop
173 var_counter = 0
174 }
175}
176
177#tv14 - in some distance in front of the corner of the right wall; from left to right
178func void victim_thug1(string ai_name)
179{
180ai2_spawn victim_thug1
181ai2_spawn cruel_striker1
182}
183
184#console11
185func void lock2(string ai_name)
186{
187particle lock2_locklight01 do start
188trigvolume_enable hidden_friends1 1
189music_stop
190}
191
192#tv15 - in the middle of the passage to door 41
193func void hidden_thugs(string ai_name)
194{
195ai2_spawn Start_Friend_2
196ai2_spawn Start_Friend_3
197}
198
199#console 12
200func void lock1(void)
201{
202particle lock1_locklight01 do start
203target_set 7125 30
204}
205
206##########
207### SP2 ###
208##########
209
210#tv1 - in some distance after door 11
211func void tarmac(string ai_name)
212{
213if(save_point ne 2)
214 {
215 fork remove_ai
216 save_game 2 autosave
217 particle lock1_locklight01 do stop
218 door_close 11
219 door_lock 11
220 particle room1 do stop
221 particle bomb_damage1 do stop
222 }
223particle compound create
224ai2_spawn tarmac_striker_1
225ai2_spawn tarmac_striker_2
226ai2_spawn tarmac_striker_3
227ai2_spawn tarmac_tanker_1
228ai2_spawn tarmac_tanker_2
229ai2_spawn tarmac_commguy_1
230objective_set 2 silent
231target_set 7037 30
232sleep 1
233sound_music_start atm_gr09 0.75
234sound_dialog_play c00_01_18shinatama
235}
236
237#tv18 - big box around the entrance of the area which is fenced in (where the mad bomber waits)
238func void striker_tee_off(string ai_name)
239{
240ai2_dopath tarmac_striker_4 tarmac_striker_3b 1
241}
242
243#tv19 - compled area which is fenced in (where the mad bomber waits)
244#hit func of tarmac_striker_3
245func void tanker_backup(string ai_name)
246{
247ai2_dopath tarmac_tanker_2 tarmac_tanker_2b 1
248}
249
250#tv17 - after door 46; from left to right
251func void unlock_commguy(string ai_name)
252{
253ai2_dopath tarmac_commguy_1 tarmac_commguy_2 1
254ai2_dopath tarmac_tanker_2 tarmac_tanker_2c 1
255music_stop
256}
257
258#console 1
259func void Hangar1_A(void)
260{
261particle lock3_locklight01 do start
262door_unlock 12
263target_set 7085 30
264}
265
266#tv12 and 45 - in some distance after door 12
267func void muro_bait(string ai_name)
268{
269trigvolume_enable murobait_a 0
270trigvolume_enable murobait_b 0
271particle compound kill
272door_close 12
273door_lock 12
274ai2_spawn muro1
275ai2_spawn escort_striker1
276ai2_spawn escort_striker2
277playback muro1 muro1 interp 30
278playback escort_striker1 escort_striker1 interp 30
279playback escort_striker2 escort_striker2 interp 30
280sound_music_start mus_asian 0.75
281particle garage1_locklight02 do start
282door_open 26
283door_jam 26
284ai2_spawn Hangar1_A_Striker_1
285ai2_spawn Hangar1_A_Striker_2
286ai2_spawn Hangar1_A_Striker_3
287playback Hangar1_A_Striker_2 hangar1_striker2 interp 30
288playback Hangar1_A_Striker_3 hangar1_striker3 interp 30
289playback Hangar1_A_Striker_1 hangar1_striker1 interp 30
290sleep 30
291sound_dialog_play c00_01_20shinatama
292objective_set 3 silent
293target_set 0 0
294sleep 600
295chr_delete muro1
296chr_delete escort_striker1
297chr_delete escort_striker2
298}
299
300#lose func of Hangar1_A_Striker_1
301func void striker_lullaby_2(string ai_name)
302{
303striker_lullaby_1
304}
305
306### WAY TO THE GAS TUNNEL ###
307
308#console13
309func void rat_door(string ai_name)
310{
311particle lock9_locklight02 do start
312door_unlock 24
313}
314
315#tv48 - after door 26
316func void low_target_clear(string ai_name)
317{
318target_set 0 0
319}
320
321#tv49 - after tv48
322func void low_target_set(string ai_name)
323{
324target_set 7085 30
325}
326
327#tv2 - in some distance after tv49
328func void hangar1a(string char_index)
329{
330ai2_spawn Hangar1_B_Striker_1
331ai2_spawn Hangar1_B_Striker_4
332}
333
334#lose func of Hangar1_B_Striker_1 and Hangar1_B_Striker_4
335func void hangar1d_var(string ai_name)
336{
337var_counter = var_counter + 1
338if(var_counter eq 2)
339 {
340 particle garage2_locklight02 do start
341 door_unlock 19
342 door_open 19
343 door_jam 19
344 ai2_spawn hangar1d_enemy_1
345 ai2_spawn hangar1d_enemy_2
346 }
347}
348
349#lose func of hangar1d_enemy_1 and hangar1d_enemy_2
350func void hangar1f_var(string ai_name)
351{
352var_counter = var_counter + 1
353if (var_counter eq 4)
354 {
355 particle garage3_locklight02 do start
356 door_unlock 20
357 door_open 20
358 door_jam 20
359 ai2_spawn hangar1f_enemy_1
360 ai2_spawn hangar1f_enemy_3
361 ai2_spawn rat_thug_4
362 var_counter = 0
363 }
364}
365
366#tv39 - after door 20 (entry func: skip_ratscene); I've disabled it
367
368#hit func of hangar1f_enemy_3
369func void hangar1d_backup(string ai_name)
370{
371ai2_spawn hangar1f_enemy_2
372}
373
374func void patrolscript0500(string ai_name)
375{
376playback_block hangar1f_enemy_2 bomber_jump interp 30
377}
378
379#tv31 - after the beginning of the ramp
380func void gas_trig_show(string ai_name)
381{
382trig_show 1
383trig_show 2
384trig_show 3
385trig_show 4
386console_deactivate 14
387console_deactivate 15
388door_open 48
389door_jam 48
390}
391
392### WAY TO THE ROOF ###
393
394#tv13 - from the left wall (at the end of the right side of door 26) to the right wall
395func void hangar1b(string ai_name)
396{
397ai2_spawn superball_striker
398}
399
400#tv50 - at the beginning of the first plattform; at the end of the first ramp
401func void high_target_clear(string ai_name)
402{
403target_set 0 0
404}
405
406#tv51 - after tv50
407func void high_target_set(string ai_name)
408{
409target_set 7126 30
410}
411
412#console 8
413func void lock5(void)
414{
415particle lock5c_locklight01 do start
416lock_check
417}
418
419#tv30 - after the room with console 3; left side; at the end of the ramp
420func void hangar1c(string char_index)
421{
422ai2_spawn Hangar1_B_Striker_5
423ai2_spawn Hangar1_B_Striker_9
424ai2_spawn Hangar1_A_Tanker_1
425ai2_spawn Hangar1_B_Comguy_12
426}
427
428#console 3
429func void lock5a_var(string ai_name)
430{
431particle lock5a_locklight01 do start
432lock_check
433}
434
435#tv4 - the platform with door 21 and door 22; first half of the platform (tv without any func); I've disabled it
436
437#console 33
438func void lock5b_var(string ai_name)
439{
440particle lock5b_locklight01 do start
441lock_check
442}
443
444func void lock_check(void)
445{
446var_counter2 = var_counter2 + 1
447if(var_counter2 eq 1) music_stop
448if(var_counter2 eq 3)
449 {
450 door_unlock 21
451 door_unlock 22
452 roof_guys
453 }
454}
455
456func void roof_guys(void)
457{
458#particles
459particle carpool create
460particle carpool do start
461particle roof2 do start
462particle roof3 do start
463#roof1
464ai2_spawn ahah_badman_1
465ai2_spawn ahah_badman_2
466ai2_spawn Roof1_Striker_1
467ai2_spawn Roof1_Striker_2
468#roof2
469ai2_spawn carpool_striker_1
470ai2_spawn Roof2_Striker_1
471ai2_spawn Roof2_Striker_2
472ai2_spawn Roof2_Striker_3
473#tv
474trigvolume_enable trigger_volume_08 0
475}
476
477##########
478### SP3 ###
479##########
480
481### GAS TUNNEL ###
482
483#tv5 - in some distance after door 24
484func void save_point_3(string ai_name)
485{
486if(save_point eq 3)
487 {
488 gas_trig_show
489 objective_set 3 silent
490 target_set 7085 30
491 }
492else
493 {
494 fork remove_ai
495 save_game 3 autosave
496 particle lock9_locklight02 do stop
497 door_close 24
498 door_lock 24
499 }
500ai2_spawn Rat_Tanker_1
501ai2_spawn Rat_Comguy_1
502sleep 1
503sound_music_start atm_cl09 0.75
504trigvolume_enable save2 0
505trigvolume_enable save3 0
506}
507
508#tv28 - the complete volume of the tunnel (tv name: gas)
509func void poison_konoko(string ai_name)
510{
511chr_poison(0, 10, 60, 90);
512}
513
514#fired off by touching the triggers (lasers)
515func void gas(string ai_name)
516{
517particle gas1 do start
518particle gas2 do start
519particle gaslight1 do start
520console_activate 14
521console_activate 15
522door_unjam 48
523door_close 48
524door_jam 48
525trigvolume_enable gas 1
526}
527
528#console 14 and console 15
529func void gas_off(string ai_name)
530{
531particle gas1 do stop
532particle gas2 do stop
533particle gaslight1 do stop
534console_reset 14
535console_reset 15
536console_deactivate 14
537console_deactivate 15
538door_unjam 48
539door_open 48
540door_jam 48
541trigvolume_enable gas 0
542}
543
544#tv27 - in some distance in front of door 48 (entry func: Rat_Guards); I've disabled it
545
546#tv29 - after door 48
547func void gas_kill(string ai_name)
548{
549particle gas1 do stop
550particle gas2 do stop
551particle gaslight1 do stop
552door_unjam 48
553door_close 48
554trig_hide 1
555trig_hide 2
556trig_hide 3
557trig_hide 4
558}
559
560#tv32 - in some distance in front of door 35
561func void gas_trig_hide(string ai_name)
562{
563roof_guys
564}
565
566### ROOF ###
567
568#tv26 - long volume after door 21 and door 22
569func void save_point_2(string ai_name)
570{
571if(save_point eq 3)
572 {
573 fork roof_guys
574 objective_set 3 silent
575 }
576else
577 {
578 save_game 3 autosave
579 particle lock5a_locklight01 do stop
580 particle lock5b_locklight01 do stop
581 particle lock5c_locklight01 do stop
582 door_close 21
583 door_close 22
584 door_lock 21
585 door_lock 22
586 }
587target_set 7085 30
588trigvolume_enable save2 0
589trigvolume_enable save3 0
590sleep 1
591sound_music_start atm_cl09 1.0
592}
593
594#tv21 - complete left end of the roof
595#tv20 - at the beginning of the cul-de-sac
596func void secret_striker(string char_index)
597{
598ai2_spawn secret_striker_1
599}
600
601#notice func of secret_striker_1
602func void secret_tanker(string char_index)
603{
604ai2_spawn secret_tanker_1
605}
606
607#tv22 - complete front end of the roof
608#tv23 - complete right end of the roof
609#tv24 - at the roof of the gas tunnel; from the left to the right; start left: at the beginning of the first short ramp
610func void low_roadies_1(string ai_name)
611{
612ai2_spawn Back_Striker_1
613ai2_spawn Back_Striker_2
614ai2_spawn Back_Striker_3
615ai2_spawn Back_Thug_1
616}
617
618#notice func of Back_Striker_3
619func void sos_2(string char_index)
620{
621ai2_spawn sos_badman_2
622}
623
624#tv25 - at the end of the underpass of the gas tunnel
625func void low_roadies_2(string ai_name)
626{
627ai2_spawn Back_Tanker_1
628ai2_spawn Back_Thug_2
629ai2_spawn Back_Thug_3
630}
631
632### BOTH WAYS FUSE ###
633
634func void carpool_backup(string char_index)
635{
636ai2_spawn carpool_striker_2
637}
638
639#tv42 - huge box around the carpool (entry func: carpool_start; exit func: carpool_stop); I've disabled it
640
641#tv6 - on the roof of the underpass to console 10; at the beginning (top) of the ramp
642func void Back3(string char_index)
643{
644ai2_spawn Roof3_Striker_1
645ai2_spawn Roof3_Striker_2
646ai2_spawn Roof3_Tanker_1
647}
648
649#hit func of Roof3_Tanker_1
650func void roof3_backup1(string char_index)
651{
652ai2_dopath Roof3_Striker_1 Roof3_Striker_1b 1
653}
654
655#tv33 - huge box around the underpass to console 10; includes the roof of the underpass
656func void back_compound(string char_index)
657{
658ai2_spawn compound_tanker_1
659ai2_spawn compound_bomber_1
660}
661
662#tv41 - huge wall from left to right over the complete area below and the roof; starts in some distance after the stiarway to door 27
663func void remote_parking(string ai_name)
664{
665ai2_spawn hostage_thug_1
666ai2_spawn hostage_thug_2
667ai2_spawn hostage_thug_3
668ai2_spawn squad_tanker_1
669ai2_spawn squad_tanker_2
670var_counter2 = 10
671}
672
673#lose func of squad_tanker_1
674func void remote_backup_1(string ai_name)
675{
676ai2_spawn hostage_striker_1
677}
678
679#lose func of squad_tanker_2
680func void remote_backup_2(string ai_name)
681{
682ai2_spawn hostage_striker_2
683}
684
685##########
686### SP4 ###
687##########
688
689#console 10
690func void save_point_4(string ai_name)
691{
692trigvolume_enable trigger_volume_08 1
693particle lock6_locklight01 do start
694door_unlock 27
695if(save_point eq 4)
696 {
697 console_deactivate 10
698 particle carpool create
699 particle carpool do start
700 particle roof2 do start
701 particle roof3 do start
702 trigvolume_enable backcompound 0
703 trigvolume_enable hidden1a 0
704 trigvolume_enable hidden1b 0
705 trigvolume_enable lowroad1 0
706 trigvolume_enable lowroad2 0
707 trigvolume_enable lowroad3 0
708 trigvolume_enable lowroad4 0
709 trigvolume_enable remote 0
710 trigvolume_enable save2 0
711 trigvolume_enable trigger_volume_07 0
712 }
713else
714 {
715 fork remove_ai
716 music_stop
717 fade_out 0 0 0 30
718 sleep 30
719 chr_teleport 0 2020
720 chr_peace 0
721 fade_in 30
722 save_game 4 autosave
723 }
724target_set 7060 30
725objective_set 4 silent
726sound_dialog_play c00_01_19shinatama
727}
728
729#tv7 - in front of door 27
730func void Office1(string char_index)
731{
732if(var_counter2 ne 10) fork save_point_4
733ai2_spawn Office1_Comguy_1
734ai2_spawn Office1_Comguy_11
735ai2_spawn Office2_Striker_1
736ai2_spawn Office2_Striker_3
737ai2_spawn Office3_Tanker_12
738ai2_spawn neutral_1
739ai2_spawn neutral_2
740sleep 1
741sound_music_start atm_gr09
742}
743
744#tv44 - around the box with the lsi
745func void objective_check(string ai_name)
746{
747if(chr_has_lsi(0))
748 {
749 trigvolume_enable objectivecheck 0
750 objective_set 5 silent
751 target_set 7127 30
752 particle lock6_locklight01 do stop
753 door_lock 27
754 particle carpool do stop
755 particle carpool kill
756 particle roof2 do stop
757 particle roof3 do stop
758 }
759}
760
761#tv36 - in the middle of the stairs to door 33
762func void lsi_check_1(string ai_name)
763{
764if(chr_has_lsi(0))
765 {
766 trigvolume_enable tripwire 1
767 music_stop
768 }
769}
770
771#tv34 - in some distance in front of door 36
772func void ambush(string ai_name)
773{
774ai2_spawn ambush_striker_1
775if(save_point ne 5)
776 {
777 particle lock7_locklight01 do start
778 door_unlock 36
779 ai2_spawn ambush_commguy_1
780 sleep 220
781 ai2_doalarm ambush_commguy_1 4
782 }
783sleep 1
784sound_music_start mus_space01 0.75
785}
786
787##########
788### SP5 ###
789##########
790
791#tv8 - after door 36
792func void save_point_5(string ai_name)
793{
794trigvolume_enable hangar2_setup 0
795if(save_point eq 5)
796 {
797 restore_game
798 ambush
799 objective_set 5 silent
800 }
801else
802 {
803 save_game 5 autosave
804 particle lock7_locklight01 do stop
805 door_close 36
806 door_lock 36
807 }
808particle muroplane_prop do start
809particle rotorwash do start
810ai2_spawn Hangar2_tanker_1
811ai2_spawn alarm_striker_1
812target_set 1054 30
813}
814
815#console 4
816func void raise_alarm(string char_index)
817{
818ai2_dopath alarm_striker_1 alarm_striker_1a 1
819fork alarm_sound_script
820}
821
822func void alarm_sound_script(void)
823{
824sound_ambient_start alarm_loop
825sleep 900
826sound_ambient_stop alarm_loop
827}
828
829#tv35 - in front of door 42
830func void alarm_patrol(string char_index)
831{
832ai2_dopath alarm_striker_1 alarm_striker_1b 1
833}
834
835#tv37 - in some distance after door 42
836func void final_muro(string char_index)
837{
838ai2_spawn muro2
839ai2_spawn escort_striker3
840ai2_spawn escort_striker4
841playback escort_striker3 final_escort3
842playback escort_striker4 final_escort4
843playback muro2 final_muro
844sleep 960
845chr_delete muro2
846chr_delete escort_striker3
847sleep 60
848chr_delete escort_striker4
849}
850
851#tv38 - on the last but one platform; at the beginning of the last part of the ramp
852func void Hangar2b(string char_index)
853{
854ai2_spawn Hangar2_Striker_3
855ai2_spawn Hangar2_Striker_4
856ai2_spawn Hangar2_Striker_5
857}
858
859#lose func of Hangar2_Striker_5
860func void striker_showdown_1(string ai_name)
861{
862striker_showdown_3
863}
864
865#lose func of Hangar2_Striker_4
866func void striker_showdown_2(string ai_name)
867{
868striker_showdown_3
869}
870
871#lose func of Hangar2_Striker_3
872func void striker_showdown_3(string ai_name)
873{
874var_counter = var_counter + 1
875if(var_counter eq 3)
876 {
877 trigvolume_enable rappel_point 1
878 particle rappel create
879 target_set 1054 30
880 music_stop
881 }
882}
883
884#tv10 - at the rappel point
885func void lsi_check_2(string ai_name)
886{
887fade_out 0 0 0 30
888sleep 30
889win
890}
891
892#####################
893### TEXT CONSOLES ###
894#####################
895
896func void level6a(void)
897{
898text_console level_6a
899console_reset 16
900}
901
902func void level6b(void)
903{
904text_console level_6b
905console_reset 9
906}
907
908func void level6c(void)
909{
910text_console level_6c
911console_reset 13
912}
913
914func void level6d(void)
915{
916text_console level_6d
917console_reset 17
918}
919
920func void level6e(void)
921{
922text_console level_6e
923console_reset 5
924}
925
926func void level6f(void)
927{
928text_console level_6f
929console_reset 2
930}
Note: See TracBrowser for help on using the repository browser.