source: nikanabo/current/bsl/original/IGMD/roof/roof.bsl@ 745

Last change on this file since 745 was 185, checked in by geyser, 18 years ago
File size: 16.0 KB
RevLine 
[185]1# rooftop
2# scripts for level 12 by wu
3#
4# LEGEND
5#
6# character naming convention: X_Yx
7# where X = area letter (A=first area, B=second area, etc.)
8# Y = character type (N=ninja, T=tanker, S=striker, R=red, etc.)
9# x = character number, usually same as character's initial patrol id
10#
11# trigger volume scripts: t##, where ## refers to trigger volume id
12#
13# CONTENTS
14#
15# 1.variables defined
16# 1b.music scripts
17# 2.start and objectives scripts
18# 3.save game scripts
19# 4.cut scene scripts
20# 5.console scripts
21# 6.trigger volume scripts
22
23###############################
24# variables defined #
25###############################
26
27var int my_save_point=0;
28var int ninja1=0;
29var int ninja2=0;
30var int strike1=0;
31var int strike1b=0;
32var int strike2=0;
33var int strike3=0;
34#var int elv1_check=0;
35var int invading_counter=3;
36var int done_with_intro_cutscene = 0;
37var int go_hide;
38var int go_hide2;
39
40###############################
41# music #
42###############################
43
44func void music_first(void)
45{
46 sound_music_start mus_cool19 0.0
47 sound_music_volume mus_cool19 0.75 3.0
48# stopped at tanker death or timer
49}
50
51func void music_first_timer(void)
52{
53 sleep 1800
54 music_stop
55}
56
57func void music_gauntlet(void)
58{
59 sound_music_start mus_atm_cl12lp 0.0
60 sound_music_volume mus_atm_cl12lp 0.75 3.0
61# this music stopped in t14
62}
63
64func void music_billboard(void)
65{
66 sound_music_start mus_low1 0.0
67 sound_music_start mus_low1 0.75 3
68# this music stopped in ta2_54 script
69}
70
71func void music_battle(void)
72{
73 sound_music_start mus_fitec
74# this music stopped in outro
75}
76
77func void music_stop(void)
78{
79 dprint STOP_THE_MUSIC
80 sound_music_stop mus_cool19
81 sound_music_stop mus_atm_cl12lp
82 sound_music_stop mus_low1
83 sound_music_stop mus_fitec
84}
85
86###############################
87# start and objectives #
88###############################
89func void start(string ai_name)
90{
91 dprint start
92
93 particle el1_locklight01 do start
94 door_lock 6
95
96 my_save_point = save_point;
97
98 if (my_save_point eq 0)
99 {
100 set_objective_1
101 powerup_spawn lsi 605
102 }
103
104 if (my_save_point eq 1)
105 {
106 dprint restore1
107 set_objective_1
108 done_with_intro_cutscene = 1;
109 fork intro_taunt
110 restore_game
111 powerup_spawn lsi 605
112 }
113
114 if (my_save_point eq 2)
115 {
116 done_with_intro_cutscene = 1;
117 dprint restore2
118 set_objective_1
119 chr_delete A_Sr9
120 chr_delete A_N1
121 chr_delete IntroNinja
122 ai2_spawn C_T16
123 ai2_spawn C_Sr15
124 ai2_spawn C_R55
125 ai2_spawn C_N57
126 trigvolume_enable trigger_volume_13 0
127 door_lock 3
128 restore_game
129 powerup_spawn lsi 605
130 }
131
132 if (my_save_point eq 3)
133 {
134 done_with_intro_cutscene = 1;
135 dprint restore3
136 set_objective_3
137 chr_delete A_Sr9
138 chr_delete A_N1
139 chr_delete IntroNinja
140 trigvolume_enable trigger_volume_79 0
141 restore_game
142 }
143
144 if (my_save_point eq 4)
145 {
146 done_with_intro_cutscene = 1;
147 dprint restore4
148 chr_delete A_Sr9
149 chr_delete A_N1
150 chr_delete IntroNinja
151 trigvolume_enable trigger_volume_28 0
152 ai2_spawn OutroNinja
153 chr_boss_shield OutroNinja
154 music_battle
155 gs_farclipplane_set 500
156 door_lock 2
157 restore_game
158 }
159}
160
161func void you_lose(string ai_name)
162{
163 sleep 240
164 fade_out 0 0 0 180
165 sleep 240
166 lose
167}
168
169func void you_win(int char_index)
170{
171 outro
172 win
173}
174
175func void set_objective_1(string ai_name)
176{
177 dprint set_objective_1
178 objective_set(1)
179 target_set (7006,0.0)
180}
181
182func void set_objective_2(string ai_name)
183{
184 dprint set_objective_2
185 objective_set(2)
186 target_set (7006,0.0)
187}
188
189func void set_objective_3(string ai_name)
190{
191 dprint set_objective_3
192 objective_set(3)
193 target_set (7006,0.0)
194}
195
196###################
197# save game #
198###################
199
200func void s1(string ai_name)
201{
202 dprint SAVEDGAME1
203
204 if (my_save_point ne 1)
205 {
206 save_game 1 autosave
207 }
208}
209
210func void s2(string ai_name)
211{
212 dprint SAVEDGAME2
213
214 if (my_save_point ne 2)
215 {
216 save_game 2 autosave
217 }
218}
219
220func void s3(string ai_name)
221{
222 dprint SAVEDGAME3
223
224 if (my_save_point ne 3)
225 {
226 save_game 3 autosave
227 }
228}
229
230func void s4(string ai_name)
231{
232 dprint SAVEDGAME4
233
234 if (my_save_point ne 4)
235 {
236 save_game 4 autosave
237 }
238}
239
240##########################
241# cut scene scripts #
242##########################
243
244func void t12(string ai_name)
245{
246 dprint t12_elevator
247 if (trigvolume_count(62) eq 0)
248 {
249 trigvolume_enable trigger_volume_12 0
250 sleep 7
251 trigvolume_corpse 62
252 dprint delete_oldAI
253 chr_delete B_R11
254 chr_delete B_R12a
255 chr_delete B_Sr10
256 chr_delete B_Sr10a
257 chr_delete B_T13
258 chr_delete B_Sr12
259 chr_delete B_N17
260 chr_delete B_N18
261 chr_delete A_N8
262 chr_delete A_T4
263 chr_delete A_Sr3
264 chr_delete C_N17
265 chr_delete C_N18
266 Elevator
267 target_set(47,0.0)
268 ai2_spawn C_Sr15
269 ai2_spawn C_T16
270 ai2_spawn C_R55
271 ai2_spawn C_N57
272 }
273}
274
275func void t17(string ai_name)
276{
277 dprint t17_KonokoZip
278 if (chr_has_lsi(0))
279 {
280 KonokoZip
281 chr_delete D_C19
282 chr_delete D_C60
283 chr_delete D_N25
284 chr_delete D_R21
285 chr_delete D_Sb20
286 chr_delete D_Sb22
287 chr_delete D_Sb23
288 chr_delete D_Sr24
289 chr_delete D_Sr26
290 chr_delete D_Sr27
291 chr_delete D_Sr38
292 chr_delete D_T28
293 set_objective_3
294 }
295}
296
297func void t27(string ai_name)
298{
299 dprint t27_ElevatorFinalFight
300 ai2_spawn SuperNinja
301# Elevator cut scene
302# I'm backing him into a corner. This isn't going to be pretty..."
303
304 chr_teleport 0 96
305
306}
307
308
309###################
310# console #
311###################
312
313#########################
314# trigger volume stuff #
315#########################
316
317func void t28(string ai_name)
318{
319 chr_wait_animtype char_0 Pickup_Object
320 particle obj_zip create
321}
322
323func void runup(void)
324{
325 ai2_dopath B_Sr10 patrol_10z
326 ai2_setjobstate B_Sr10
327}
328
329func void t1(string ai_name)
330{
331 dprint t1
332 ai2_dopath A_N1 patrol_02
333 ai2_setjobstate A_N1
334 ai2_dopath IntroNinja patrol_40
335 ai2_setjobstate IntroNinja
336 if (strike1b eq 1)
337 {
338 dprint strike1b
339 ai2_dopath A_Sr9 patrol_09
340 ai2_setjobstate A_Sr9
341 }
342 sleep 300
343 if (ninja1 ne 0)
344 {
345 dprint ninja1_failed_trying_again
346 ai2_dopath IntroNinja patrol_40
347 ai2_setjobstate IntroNinja
348 }
349
350 if (ninja2 ne 0)
351 {
352 dprint ninja2_failed_trying_again
353 ai2_dopath A_N1 patrol_02
354 ai2_setjobstate A_N1
355 }
356}
357
358func void patrolscript0001(string ai_name)
359{
360 dprint patrolscript0001_t1
361 playback_block IntroNinja ninja_jump5 interp 30
362# ai2_makeignoreplayer A_N1 0
363}
364
365func void patrolscript0002(string ai_name)
366{
367 dprint patrolscript0002_t1
368 playback_block A_N1 ninja_jump interp 30
369# ai2_makeignoreplayer A_N1 0
370}
371
372func void t2(string ai_name)
373{
374 dprint t2
375 trigvolume_enable trigger_volume_03 0
376 ai2_spawn A_C5
377}
378
379func void t3(string ai_name)
380{
381 dprint t3
382 trigvolume_enable trigger_volume_02 0
383 ai2_spawn A_Sr3
384}
385
386func void t4(string ai_name)
387{
388 dprint t4
389 trigvolume_enable trigger_volume_05 0
390 ai2_spawn A_T6
391 chr_delete A_Sr9
392 chr_delete A_N1
393 chr_delete IntroNinja
394
395}
396
397func void patrolscript0004(string ai_name)
398{
399 dprint patrolscript0004
400 playback_block A_T6 tanker2 interp 20
401
402}
403
404func void t5(string ai_name)
405{
406 dprint t5
407 trigvolume_enable trigger_volume_04 0
408 ai2_spawn A_T4
409 chr_delete A_Sr9
410 chr_delete A_N1
411 chr_delete IntroNinja
412
413}
414
415func void patrolscript0005(string ai_name)
416{
417 dprint patrolscript0005
418 playback_block A_T4 tanker1 interp 20
419
420}
421
422func void t6(string ai_name)
423{
424 dprint t6
425 ai2_spawn A_N7
426 trigvolume_enable trigger_volume_07_copy 0
427
428}
429
430func void t7(string ai_name)
431{
432 dprint t7
433 ai2_spawn A_N8
434 trigvolume_enable trigger_volume_06 0
435}
436
437func void t8(string ai_name)
438{
439 dprint t8
440 ai2_spawn B_Sr10
441 ai2_spawn B_Sr10a
442 ai2_spawn B_R11
443 ai2_spawn B_R12a
444 ai2_dopath A_T6 patrol_42
445 ai2_setjobstate A_T6
446 ai2_dopath A_T4 patrol_42
447 ai2_setjobstate A_T4
448# ai2_dopath A_Sr3 patrol_44
449 ai2_setjobstate A_Sr3
450# ai2_dopath A_C5 patrol_44
451 ai2_setjobstate A_C5
452 ai2_dopath A_N7 patrol_45
453 ai2_setjobstate A_N7
454 ai2_dopath A_N8 patrol_45
455 ai2_setjobstate A_N8
456}
457
458func void t9(string ai_name)
459{
460 dprint t9
461 ai2_spawn E_N37
462 ai2_makeignoreplayer E_N37 1
463 playback_block E_N37 ninja_jump2
464 ai2_makeignoreplayer E_N37 0
465 ai2_attack E_N37 char_0
466}
467
468func void t10(string ai_name)
469{
470 dprint t10
471 # "I lost him. Wait! There he is."
472 sound_dialog_play c11_39_03konoko
473 ai2_spawn B_Sr12
474 ai2_spawn B_T13
475 ai2_spawn B_SuperNinja
476 chr_boss_shield B_SuperNinja
477 chr_unstoppable B_SuperNinja 1
478 chr_neutral B_SuperNinja 1
479 playback_block B_SuperNinja superninja1 interp 20
480 sleep 60
481 chr_delete B_SuperNinja
482
483}
484
485func void t11(string ai_name)
486{
487 dprint t11
488 ai2_spawn C_N17
489 ai2_spawn C_N18
490 ai2_dopath B_T13 patrol_41
491 ai2_setjobstate B_T13
492}
493
494func void patrolscript0011(string ai_name)
495{
496 dprint patrolscript0011
497 playback_block B_T13 tanker_jump interp 30
498
499}
500
501func void t14(string ai_name)
502{
503 dprint t14
504 music_stop
505 target_set (1,0.0)
506 chr_delete C_N57
507 chr_delete C_Sr15
508 chr_delete C_T16
509 chr_delete C_R55
510 ai2_dopath D_Sb20 patrol_35
511 ai2_spawn D_Sr38
512 ai2_spawn D_C60
513}
514
515func void patrolscript0014(string ai_name)
516{
517 dprint patrolscript0014
518 playback_block D_Sb20 striker_jump interp 20
519}
520
521func void t15(string ai_name)
522{
523 dprint t15
524 ai2_spawn E_N14
525 ai2_spawn E_N14a
526 ai2_passive E_N14 1
527 #ai2_passive E_N14a 1
528 ai2_spawn NinjaZip
529 ai2_passive NinjaZip 1
530 chr_unstoppable NinjaZip 1
531 playback NinjaZip NinjaZipSet
532 playback E_N14 Ninja02Set
533
534}
535
536#func void patrolscript0016(string ai_name)
537#{
538# dprint patrolscript0016
539# playback_block E_N14 LSIninja interp 20
540#}
541
542func void t18(string ai_name)
543{
544 dprint t18
545 music_gauntlet
546 ai2_spawn D_C19
547 ai2_spawn D_Sb20
548 ai2_spawn D_R21
549 ai2_spawn D_Sb22
550 ai2_spawn D_Sb23
551 ai2_spawn D_Sr24
552}
553
554func void t19(string ai_name)
555{
556 dprint t19
557 music_billboard
558 ai2_spawn D_N25
559 ai2_spawn C_R61
560}
561
562func void t20(string ai_name)
563{
564 dprint t20
565 music_stop
566 ai2_spawn D_Sr26
567 ai2_spawn D_Sr27
568 ai2_spawn D_T28
569}
570
571func void cantescape_dialog(void)
572{
573 sleep 120
574 # "He can't escape me. But why?"
575 sound_dialog_play c11_39_04konoko
576}
577
578func void t21(string ai_name)
579{
580 dprint t21_E_SuperNinja
581 fork cantescape_dialog
582 ai2_spawn E_N29
583 ai2_spawn E_Sb31
584 ai2_spawn E_Sr63
585 ai2_spawn E_Sr64
586 ai2_spawn E_R65
587 ai2_spawn E_SuperNinja
588 chr_boss_shield E_SuperNinja
589 chr_unstoppable E_SuperNinja
590 playback_block E_SuperNinja superninja2 interp 20
591 sleep 60
592 chr_delete E_SuperNinja
593
594}
595
596func void t22(string ai_name)
597{
598 dprint t22
599 ai2_dopath IntroNinja patrol_39
600 ai2_setjobstate IntroNinja
601
602}
603
604func void patrolscript0022(string ai_name)
605{
606 dprint patrolscript0022
607 playback_block IntroNinja ninja_jump4 interp 20
608
609}
610
611func void t23(string ai_name)
612{
613 dprint t23
614 ai2_spawn E_Sr30
615
616}
617
618func void t24(string ai_name)
619{
620 dprint t24
621 # "He knows I can feel him. That we are... rivals? Natural enemies?"
622 sound_dialog_play c11_39_08konoko
623 ai2_spawn E_R32
624 ai2_dopath E_Sr33 patrol_34
625 ai2_setjobstate E_Sr33
626}
627
628func void t25(string ai_name)
629{
630 dprint t25
631 ai2_spawn E_Sr33
632 ai2_dopath E_Sr30 patrol_34
633 ai2_setjobstate E_Sr30
634}
635
636func void t29(string ai_name)
637{
638 dprint t29
639 # "There's something familar about him, I can't quite place it."
640 sound_dialog_play c11_39_05konoko
641}
642
643func void t30(string ai_name)
644{
645 dprint t30_D_SuperNinja
646 # "Where... ? Ah! Over there!"
647 sound_dialog_play c11_39_01konoko
648 ai2_spawn D_SuperNinja
649 chr_boss_shield D_SuperNinja
650 chr_unstoppable D_SuperNinja 1
651 playback_block D_SuperNinja superninja1b interp 20
652 sleep 60
653 chr_delete D_SuperNinja
654
655}
656
657func void t31(string ai_name)
658{
659 dprint t31
660 ai2_spawn A_N43
661}
662
663func void t32in(string ai_name)
664{
665 dprint t32in
666 ninja1 = ninja1 + 1
667}
668
669func void t32out(string ai_name)
670{
671 dprint t32out
672 ninja1 = ninja1 - 1
673}
674
675func void t33in(string ai_name)
676{
677 dprint t33in
678 ninja2 = ninja2 + 1
679}
680
681func void t33out(string ai_name)
682{
683 dprint t33out
684 ninja2 = ninja2 - 1
685}
686
687func void ninja1_die(string ai_name)
688{
689 dprint ninja1_die
690 ninja1 = 0
691}
692
693func void ninja2_die(string ai_name)
694{
695 dprint ninja2_die
696 ninja2 = 0
697}
698
699func void t57(string ai_name)
700{
701 dprint t57
702 strike1=1
703 sleep 120
704 if (strike1 eq 1)
705 {
706 ai2_dopath A_Sr9 patrol_48
707 ai2_setjobstate A_Sr9
708 }
709}
710
711func void t57b(string ai_name)
712{
713 dprint t57b
714 strike1=0
715 strike1b=1
716}
717
718
719func void t58(string ai_name)
720{
721 dprint t58
722 music_first
723# ai2_makeignoreplayer A_Sr9 1
724# ai2_makeignoreplayer A_N1 1
725# ai2_makeignoreplayer IntroNinja 1
726 ai2_dopath A_Sr9 patrol_49
727 ai2_setjobstate A_Sr9
728 ai2_dopath A_N1 patrol_50
729 ai2_setjobstate A_N1
730 ai2_dopath IntroNinja patrol_51
731 ai2_setjobstate IntroNinja
732# sleep 15
733# ai2_makeignoreplayer A_Sr9 0
734# ai2_makeignoreplayer A_N1 0
735# ai2_makeignoreplayer IntroNinja 0
736 music_first_timer
737
738}
739
740func void t83(string ai_name)
741{
742 dprint checking
743 go_hide = go_hide + 1;
744 if(trigvolume_count (83) ne 0)
745 {
746 dprint t83
747 if(go_hide eq 0)
748 {
749 ai2_makeignoreplayer (ai_name,1)
750 ai2_dopath (ai_name,patrol_13b)
751 ai2_setjobstate (ai_name)
752 ai2_forget (ai_name)
753 sleep 60
754 ai2_makeignoreplayer (ai_name,0)
755 }
756 if(go_hide eq 1)
757 {
758 ai2_makeignoreplayer (ai_name,1)
759 ai2_dopath (ai_name,patrol_12b)
760 ai2_setjobstate (ai_name)
761 ai2_forget (ai_name)
762 sleep 60
763 ai2_makeignoreplayer (ai_name,0)
764 }
765 }
766}
767
768func void t83b(string ai_name)
769{
770 dprint t83B
771 go_hide = go_hide - 1;
772}
773
774func void t84(string ai_name)
775{
776 dprint checking
777 go_hide2 = go_hide2 + 1;
778 sleep 60
779 if(trigvolume_count (84) ne 0)
780 {
781 dprint t84
782 if(go_hide2 eq 0)
783 {
784 ai2_makeignoreplayer (ai_name,1)
785 ai2_dopath (ai_name,patrol_69)
786 ai2_setjobstate (ai_name)
787 ai2_forget (ai_name)
788 sleep 60
789 ai2_makeignoreplayer (ai_name,0)
790 }
791 if(go_hide2 eq 1)
792 {
793 ai2_makeignoreplayer (ai_name,1)
794 ai2_dopath (ai_name,patrol_70)
795 ai2_setjobstate (ai_name)
796 ai2_forget (ai_name)
797 sleep 60
798 ai2_makeignoreplayer (ai_name,0)
799 }
800 if(go_hide2 eq 2)
801 {
802 ai2_makeignoreplayer (ai_name,1)
803 ai2_dopath (ai_name,patrol_71)
804 ai2_setjobstate (ai_name)
805 ai2_forget (ai_name)
806 sleep 60
807 ai2_makeignoreplayer (ai_name,0)
808 }
809 }
810}
811
812func void t84b(string ai_name)
813{
814 dprint t84B
815 go_hide2 = go_hide2 - 1;
816}
817
818func void t85(string ai_name)
819{
820 dprint t85
821 ai2_spawn sbg_ninja
822}
823func void t59(string ai_name)
824{
825 dprint t59
826 strike2=1
827 sleep 120
828 if (strike2 eq 1)
829 {
830 ai2_dopath A_Sr3 patrol_52
831 ai2_setjobstate A_Sr3
832 ai2_dopath A_C5 patrol_52
833 ai2_setjobstate A_C5
834 }
835}
836
837func void t59b(string ai_name)
838{
839 dprint t59b
840 strike2=0
841}
842
843func void t60(string ai_name)
844{
845 dprint t60
846 strike3=1
847 sleep 120
848 if (strike3 eq 1)
849 {
850 ai2_dopath B_Sr12 patrol_53
851 ai2_setjobstate B_Sr12
852 }
853}
854
855func void t60b(string ai_name)
856{
857 dprint t60b
858 strike3=0
859}
860
861func void t63(string ai_name)
862{
863 if (trigvolume_count(64) eq 0)
864 {
865 trigvolume_enable trigger_volume_63 0
866 dprint t63
867 chr_delete E_R32
868 chr_delete E_Sr33
869 chr_delete E_Sr30
870 door_unlock 6
871 }
872}
873
874func void t65(string ai_name)
875{
876 dprint t65
877 chr_teleport C_R55 7013
878 ai2_dopath C_R55 patrol_56
879 ai2_setjobstate C_R55
880}
881
882func void t77(string ai_name)
883{
884 dprint t77
885 ai2_dopath D_R21 patrol_58
886}
887
888func void t78(string ai_name)
889{
890 dprint t78
891 ai2_dopath D_R21 patrol_59
892}
893
894func void minus_invading_counter(string ai_name)
895{
896 invading_counter = invading_counter - 1
897
898 if (invading_counter eq 0)
899 {
900 invading_dialog();
901 }
902}
903
904func void invading_dialog(void)
905{
906 invading_counter = 0;
907 trigvolume_enable trigger_volume_95 0
908
909 sleep 90
910 # "It's like this is his territory, and I'm invading."
911 sound_dialog_play c11_39_06konoko
912}
913
914func void t95(string ai_name)
915{
916 dprint t95
917
918 invading_dialog();
919}
920
921func void t96(string ai_name)
922{
923 dprint t96
924 # "He's... angry! I can _taste_ his frustration."
925 sound_dialog_play c11_39_07konoko
926}
927
928func void patrolscript0077(string ai_name)
929{
930 dprint 0077
931 ai2_dopath D_R21 patrol_21
932 ai2_setjobstate D_R21
933}
934
935func void t80(string ai_name)
936{
937 dprint t78
938 ai2_spawn E_C62
939 playback E_C62 com
940
941}
942
Note: See TracBrowser for help on using the repository browser.