source: AE/packages/VanillaBSL/IGMD/Airport/airport1_level_logic.bsl@ 459

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

rename ahoy

File size: 12.7 KB
Line 
1### AIRPORT 1 LEVEL LOGIC ###
2
3### START, SAVE & OBJECTIVES ###
4
5func void func_start(string ai_name)
6{
7 dprint start_active
8
9 trigvolume_enable hidden1 1
10 trigvolume_enable hidden1 1
11
12 if (save_point eq 0)
13 {
14 my_save_point=0;
15 particle auto1 start
16 particle auto1fire start
17 particle auto1spark start
18 particle door1spark start
19 particle tctf1 start
20 }
21
22 if (save_point eq 1)
23 {
24 my_save_point=1;
25 env_show 10 1
26 env_show 11 1
27 env_show 12 1
28 dprint restore1_active
29 particle auto1 start
30 particle auto1fire start
31 particle auto1spark start
32 particle door1spark start
33 particle tctf1 start
34 sound_music_start mus_asian 0.5
35 music_script_start();
36 ai2_spawn IntroStriker01
37 ai2_spawn IntroStriker02
38 restore_game
39 sleep 30
40 set_target_1
41 set_objective_1
42 }
43
44 if (save_point eq 2)
45 {
46 my_save_point=2;
47 dprint restore_2
48 particle fx3 do start
49 particle exhaust create
50 Tarmac1
51 trigvolume_enable tarmac 0
52 trigvolume_enable trigger_volume_03 0
53 trigvolume_enable bomberboom 0
54 trigvolume_enable madbomberbait 0
55 door_lock 3
56 obj_kill 991 992
57 restore_game
58 sleep 30
59 set_target_3
60 set_objective_2
61 }
62
63 if (save_point eq 3)
64 {
65 my_save_point=3;
66 dprint restore3_active
67 door_lock 3
68 door_unlock 6
69 particle lock1_locklight01 do stop
70 particle lock2_locklight01 do start
71 console_deactivate 5
72 particle door7_locklight01 do start
73 particle door2_locklight01 do start
74 console_deactivate 6
75 trigvolume_enable trigger_volume_02 0
76 trigvolume_enable trigger_volume_03 0
77 trigvolume_enable trigger_volume_04 0
78 trigvolume_enable trigger_volume_08 0
79 trigvolume_enable trigger_volume_10 0
80 trigvolume_enable trigger_volume_11 0
81 trigvolume_enable save_game 0
82 trigvolume_enable secondcoming 0
83 TerminalTwo1
84 particle auto1 stop
85 particle auto1fire stop
86 particle auto1spark stop
87 particle door1spark stop
88 particle tctf1 stop
89 ai2_spawn TerminalTwo_Striker_1
90 ai2_spawn TerminalTwo_Striker_2
91 particle fx4 do start
92 particle fx5 do start
93 particle fx6 do start
94 particle fx1 do stop
95 particle fx2 do stop
96 particle fx3 do stop
97 music_script_start();
98 restore_game
99 sleep 30
100 set_objective_3
101 set_target_5
102 }
103}
104
105func void you_lose(string ai_name)
106{
107 all_music_counters
108 sleep 240
109 fade_out 0 0 0 180
110 sleep 240
111 lose
112}
113
114func void you_win(int char_index)
115{
116 all_music_counters
117 win
118}
119
120func void save_point_1(string player_name)
121{
122 dprint save_point_1_active
123 save_game 1 autosave
124}
125
126func void save_point_2(string player_name)
127{
128 dprint save_point_2_active
129 save_game 2 autosave
130}
131
132func void save_point_3(string player_name)
133{
134 dprint save_point_3_active
135 save_game 3 autosave
136 ai2_spawn TerminalTwo_Striker_1
137 ai2_spawn TerminalTwo_Striker_2
138 particle fx5 do start
139 particle fx6 do start
140 particle fx3 do stop
141 door_unlock 6
142 particle door7_locklight01 do start
143 particle lock2_locklight01 do start
144 particle door2_locklight01 do start
145}
146
147
148func void set_objective_1(string chr_index)
149{
150 dprint objective_1
151 objective_set(1)
152 sound_dialog_play c00_01_22shinatama
153}
154func void set_objective_2(string chr_index)
155{
156 dprint objective_2
157 objective_set(2)
158 sound_dialog_play c00_01_19shinatama
159}
160
161func void set_objective_3(string chr_index)
162{
163 dprint objective_3
164 objective_set(3)
165 console_deactivate 2
166 sound_dialog_play c00_01_18shinatama
167}
168
169func void set_objective_4(string chr_index)
170{
171 dprint objective_4
172 objective_set(4)
173 sound_dialog_play c00_01_20shinatama
174}
175
176func void set_target_1(string chr_index)
177{
178 dprint set_target1
179 target_set(1095, 30.0)
180 sound_dialog_play c00_01_28shinatama
181}
182
183func void set_target_2(string chr_index)
184{
185 dprint set_target2
186 target_set(1132, 30.0)
187 sound_dialog_play c00_01_27shinatama
188}
189
190func void set_target_3(string chr_index)
191{
192 dprint set_target3
193 target_set(1109, 30.0)
194 sound_dialog_play c00_01_26shinatama
195}
196
197func void set_target_4(string chr_index)
198{
199 dprint set_target4
200 target_set(1112, 30.0)
201 sound_dialog_play c00_01_25shinatama
202}
203
204func void set_target_5(string chr_index)
205{
206 dprint set_target5
207 target_set(1115, 30.0)
208 sound_dialog_play c00_01_24shinatama
209}
210
211func void set_target_6(string chr_index)
212{
213 dprint set_target6
214 target_set(1139, 30.0)
215 sound_dialog_play c00_01_28shinatama
216}
217
218func void set_target_blank(string chr_index)
219{
220 dprint set_targetblank
221 target_set(0, 0.0)
222}
223
224### MUSIC ###
225
226var int music_counter;
227
228func void music_force_stop(void)
229{
230 sleep 4500
231 if (0 ne music_counter)
232 {
233 dprint music_force_stop
234 music_counter = 0
235 all_music_counters
236 }
237}
238
239func void music_script_start(void)
240{
241 music_counter = 2
242}
243
244func void striker_lullaby_1(string ai_name)
245{
246 dprint striker_lullaby1
247 music_counter = music_counter - 1
248 if (music_counter eq 0)
249 {
250 all_music_counters();
251 sleep f120
252 }
253}
254
255func void striker_lullaby_2(string ai_name)
256{
257 dprint striker_lullaby2
258 music_counter = music_counter - 1
259 if (music_counter eq 0)
260 {
261 all_music_counters();
262 sleep f120
263 }
264}
265
266func void all_music_counters(void)
267{
268 dprint STOP_THE_MUSIC
269 sound_music_stop mus_fitec_hd
270 sound_music_stop mus_fitec
271 sound_music_stop mus_fiteb
272 sound_music_stop mus_asian
273 sound_music_stop atm_gr06
274}
275
276### TEXT CONSOLES ###
277
278func void level_4a(void)
279{
280 dprint set_text_4a
281 text_console level_4a
282 console_reset 7
283}
284
285func void level_4b(void)
286{
287 dprint set_text_4b
288 text_console level_4b
289 console_reset 7
290}
291
292func void level_4c(void)
293{
294 dprint set_text_4c
295 text_console level_4c
296 console_reset 8
297}
298
299### GAMEPLAY PROGRESSION ###
300
301func void FixDoors(string char_index)
302{
303 dprint Fix_Doors
304 particle door2_locklight01 do stop
305 door_lock 10
306}
307
308func void hidden_civilian1(string ai_name)
309{
310 dprint hidden_civilian
311 ai2_spawn hidden_civ_1
312}
313
314func void panic1a(string char_index)
315{
316 dprint panic_1a
317
318 ai2_spawn civ_victim_6
319 playback civ_victim_6 civ_victim6_flee interp 30
320 ai2_spawn civ_victim_4
321 playback civ_victim_4 civ_victim4_flee interp 30
322 sleep 30
323 ai2_spawn Intro_Striker_4
324 playback Intro_Striker_4 striker4_advance interp 30
325 ai2_spawn Intro_Comguy_1
326}
327
328func void panic1b(string char_index)
329{
330 dprint panic_1b
331 ai2_passive Intro_Striker_4 1
332 ai2_spawn civ_victim_2
333 ai2_spawn civ_victim_3
334 playback civ_victim_3 civ_victim3_flee interp 30
335 sleep 120
336 ai2_spawn Intro_Striker_3
337 ai2_attack Intro_Striker_3 civ_victim_2
338 ai2_spawn Friend_Thug_1
339 ai2_spawn Neutral_Thug_1
340 ai2_spawn Neutral_Thug_3
341 particle fx1 do start
342 particle fx2 do start
343 chr_delete civ_victim_4
344 chr_delete civ_victim_6
345}
346
347func void hide_1(string char_index)
348{
349 dprint hide1
350 ai2_spawn civ_victim_5
351 playback_block civ_victim_5 civ_victim5_flee interp 30
352 ai2_dopath civ_victim_5 civ_victim_5
353}
354
355func void horror_1(string char_index)
356{
357 dprint horror1
358 ai2_passive Intro_Striker_4 0
359 ai2_spawn civ_victim_10
360 ai2_spawn civ_victim_11
361 ai2_spawn civ_victim_20
362 ai2_spawn civ_victim_21
363 particle fx1 do start
364 particle fx2 do start
365}
366
367func void ambush_striker_1(string char_index)
368{
369 dprint ambush_1
370 ai2_spawn Terminal_Striker_1
371 ai2_spawn Terminal_Striker_2
372 ai2_spawn mad_bomber_1
373 obj_create 991 992
374}
375
376func void civ_victim_20s_flee(string char_index)
377{
378 dprint civ_victim_20s
379 ai2_dopath civ_victim_20 civ20s_flee1
380 ai2_dopath civ_victim_21 civ20s_flee2
381}
382
383func void LoadingBay1(string char_index)
384{
385 dprint spawn_guards
386 ai2_spawn LoadingBay_Thug_1
387 ai2_spawn LoadingBay_Thug_2
388 ai2_spawn LoadingBay_Striker_2
389 ai2_spawn LoadingBay_Comguy_1
390 particle fx3 do start
391}
392
393func void bomber_boom(string char_index)
394{
395 dprint bomberboom
396 particle bomb1 do explode
397 obj_kill 991 992
398 sleep 300
399 particle bomb1 stop
400}
401
402func void mad_bomber_bait(string char_index)
403{
404 dprint bomber_bait
405 ai2_dopath mad_bomber_1 bomber_flee 1
406}
407
408func void patrolscript0200(string char_index)
409{
410 dprint bomber1_death
411 chr_delete mad_bomber_1
412}
413
414func void Tarmac1(string char_index)
415{
416 dprint spawn_guards
417 ai2_spawn Tarmac_Striker_1
418 ai2_spawn Tarmac_Striker_2
419 ai2_spawn Tarmac_Striker_3
420 ai2_spawn Tarmac_Striker_4
421 ai2_spawn Tarmac_Friend_1
422 ai2_spawn LoadingBay_Striker_1
423 sound_music_start atm_gr06 0.75
424 particle tarmacfire do start
425 particle exhaust create
426}
427
428func void back9a(string ai_name)
429{
430 dprint hidden_striker1
431 ai2_spawn hidden_striker1
432}
433
434func void back9b(string ai_name)
435{
436 dprint hidden_striker1
437 ai2_spawn hidden_striker2
438}
439
440func void bay1_particles(void)
441{
442 dprint bay1_fires_on
443 particle fx3 do start
444 particle fx4 do stop
445}
446
447func void fire_damage(string ai_name)
448{
449 dprint fire_hurt_konoko
450 chr_poison (ai_name, 5, 30, 30);
451}
452
453func void bay2_particles(void)
454{
455 dprint bay2_fires_on
456 particle fx3 do stop
457 particle fx4 do start
458}
459
460# COME TO ME
461func void come_to_me(string ai_name)
462{
463 dprint go_to_konoko
464 ai2_dopath Tarmac_Striker_2 come_to_me 1
465 ai2_dopath Tarmac_Striker_3 come_to_me 1
466 ai2_dopath mad_bomber_2 come_to_me 1
467}
468
469# COME TO ME REDUX
470func void second_coming(string ai_name)
471{
472 dprint go_to_konoko_again
473 ai2_dopath Tarmac_Striker_2 come_to_me 1
474 ai2_dopath Tarmac_Striker_3 come_to_me 1
475 ai2_dopath mad_bomber_2 come_to_me 1
476}
477
478# PROGRESS CHECK
479
480var int progress_counter=2;
481
482func void progress_check_1(string ai_name)
483{
484 dprint progress_check1
485 progress_counter = progress_counter - 1
486 if (progress_counter eq 0)
487 {
488 pass_go_collect_whupass();
489 }
490}
491
492func void progress_check_2(string ai_name)
493{
494 dprint progress_check2
495 progress_counter = progress_counter - 1
496 if (progress_counter eq 0)
497 {
498 pass_go_collect_whupass();
499 }
500}
501
502func void progress_check_3(string ai_name)
503{
504 dprint progress_check3
505 progress_counter = progress_counter - 1
506 if (progress_counter eq 0)
507 {
508 pass_go_collect_whupass();
509 }
510}
511
512func void progress_check_4(string ai_name)
513{
514 dprint progress_check4
515 progress_counter = progress_counter - 1
516 if (progress_counter eq 0)
517 {
518 pass_go_collect_whupass();
519 }
520}
521
522func void exhaust_on(string ai_name)
523{
524 dprint start_exhaust
525 particle exhaust create
526}
527
528func void exhaust_off(string ai_name)
529{
530 dprint stop_exhaust
531 particle exhaust kill
532}
533
534func void pass_go_collect_whupass(string ai_name)
535{
536 dprint let_the_whupping_continue
537 trigvolume_enable save_game_2 1
538 trigvolume_enable secondcoming 0
539}
540
541func void patrolscript000(string ai_name)
542{
543 dprint do_my_bidding
544 particle lock2_locklight01 do start
545 door_unlock 6
546}
547
548func void BayTwo1(string char_index)
549{
550 dprint spawn_guards
551 ai2_spawn BayTwo_Striker_1
552 ai2_spawn hidden_friend2
553 ai2_spawn mad_bomber_2
554 sound_music_stop atm_gr06
555}
556
557func void Repair1(string char_index)
558{
559 dprint spawn_guards
560 ai2_spawn Repair_Striker_1
561 ai2_spawn Repair_Comguy_1
562 ai2_spawn alamo_thug_1
563}
564
565func void Repair2(string char_index)
566{
567 dprint spawn_guards
568 ai2_spawn Repair_Striker_2
569 ai2_spawn Repair_Comguy_2
570}
571
572func void console_2_activate(string char_index)
573{
574 dprint console2_activate
575 console_activate 2
576}
577
578func void final_ambush(string char_index)
579{
580 dprint finalambush
581 input 0
582 begin_cutscene
583 sleep 60
584 cm_interpolate ambush1 0
585 sleep 150
586 console_activate 4
587 sleep 150
588 sound_music_start mus_fitec_hd 0.91
589 music_script_start
590 cm_interpolate ambush2 0
591 cm_interpolate_block ambush3 300
592 sleep 350
593 cm_interpolate ambush4 300
594 door_unlock 14
595 particle door3_locklight01 do start
596 ai2_spawn finalam_striker_1
597 ai2_spawn finalam_striker_2
598 ai2_setmovementmode finalam_striker_1 walk
599 ai2_setmovementmode finalam_striker_2 walk
600 playback finalam_striker_1 finalam_striker1 interp 30
601 playback finalam_striker_2 finalam_striker2 interp 30
602 sleep 300
603 particle door3_locklight01 do stop
604 sleep 300
605 door_lock 14
606 ai2_dopath finalam_striker1 finalam_1 1
607 ai2_dopath finalam_striker2 finalam_2 1
608 trigvolume_enable i_uh_heheheh1 1
609 cm_reset
610 end_cutscene
611 input 1
612}
613
614func void i_uh_heheheh(string char_index)
615{
616 dprint iuh_heheheh
617 ai2_dopath finalam_striker_1 strategic_retreat1
618 ai2_dopath finalam_striker_2 strategic_retreat2
619}
620
621### DOOR LOCK LIGHTS ###
622
623func void change_terminaldoor_light(void)
624{
625 dprint door1
626 input 0
627 cm_interpolate door1 0
628 sleep 60
629 particle door1_locklight01 do start
630 sleep 150
631 cm_reset
632 input 1
633}
634
635func void change_door2_light(void)
636{
637 dprint door2
638 input 0
639 cm_interpolate door2 0
640 sleep 60
641 particle door2_locklight01 do start
642 sleep 150
643 set_objective_3
644 set_target_6
645 cm_reset
646 input 1
647}
648
649func void change_enddoor_light(void)
650{
651 dprint end_door
652 input 0
653 cm_interpolate ambush4 0
654 sleep 60
655 particle door3_locklight01 do start
656 sleep 150
657 door_unlock 14
658 cm_reset
659 input 1
660}
661
662### Level scripted by Joseph ###
Note: See TracBrowser for help on using the repository browser.