source: nikanabo/current/bsl/onilight/IGMD/roof/roof.bsl@ 1080

Last change on this file since 1080 was 185, checked in by geyser, 17 years ago
File size: 17.9 KB
Line 
1############
2### MAIN ###
3############
4
5func void main(void)
6{
7gl_fog_red = 0
8gl_fog_blue = 0
9gl_fog_green = 0
10gl_fog_start = .995
11gs_farclipplane_set 5000
12ui_suppress_prompt = 1
13chr_auto_aim_dist = 0
14start
15}
16
17#############
18### START ###
19#############
20
21func void start(string ai_name)
22{
23fork deactivate_stuff
24if(save_point eq 0) save_point = 1
25if(save_point eq 1) fork intro
26if(save_point eq 2) fork load_s2
27if(save_point eq 3) fork load_s3
28if(save_point eq 4) fork load_s4_all
29sleep 5
30fork sp_all
31}
32
33func void deactivate_stuff(void)
34{
35#not used
36trigvolume_enable trigger_volume_02 0
37trigvolume_enable trigger_volume_03 0
38trigvolume_enable trigger_volume_04 0
39trigvolume_enable trigger_volume_04_copy 0
40trigvolume_enable trigger_volume_05 0
41trigvolume_enable trigger_volume_06 0
42trigvolume_enable trigger_volume_07 0
43trigvolume_enable trigger_volume_07_copy 0
44trigvolume_enable trigger_volume_08 0
45trigvolume_enable trigger_volume_08_copy2 0
46trigvolume_enable trigger_volume_08_copy2_copy 0
47trigvolume_enable trigger_volume_08_copy2_copy_copy 0
48trigvolume_enable trigger_volume_10_copy 0
49trigvolume_enable trigger_volume_10_copy_copy 0
50trigvolume_enable trigger_volume_11 0
51trigvolume_enable trigger_volume_23 0
52trigvolume_enable trigger_volume_23_copy 0
53trigvolume_enable trigger_volume_26 0
54trigvolume_enable trigger_volume_29_copy 0
55trigvolume_enable trigger_volume_30 0
56trigvolume_enable trigger_volume_31 0
57trigvolume_enable trigger_volume_32 0
58trigvolume_enable trigger_volume_33 0
59trigvolume_enable trigger_volume_35 0
60trigvolume_enable trigger_volume_44 0
61trigvolume_enable trigger_volume_46 0
62trigvolume_enable trigger_volume_46_copy 0
63trigvolume_enable trigger_volume_46_copy2 0
64trigvolume_enable trigger_volume_46_copy3 0
65trigvolume_enable trigger_volume_46_copy_copy 0
66trigvolume_enable trigger_volume_46_copy4 0
67trigvolume_enable trigger_volume_46_copy4_copy 0
68trigvolume_enable trigger_volume_52 0
69trigvolume_enable trigger_volume_56 0
70trigvolume_enable trigger_volume_60 0
71trigvolume_enable trigger_volume_61 0
72trigvolume_enable trigger_volume_65 0
73trigvolume_enable trigger_volume_77 0
74trigvolume_enable trigger_volume_78 0
75trigvolume_enable trigger_volume_80 0
76trigvolume_enable trigger_volume_83 0
77trigvolume_enable trigger_volume_84 0
78#used
79env_show 31 0
80env_show 41 0
81env_shade 1500 1501 .9 .8 .9
82}
83
84func void you_lose(string ai_name)
85{
86fade_out 0 0 0 30
87sleep 30
88lose
89}
90
91####################################
92### SEVERAL TIMES USED FUNCTIONS ###
93####################################
94
95func void sp_all(void)
96{
97co_message_display = 0
98if(save_point eq 1) save_game 1 autosave
99if(save_point eq 2) save_game 2 autosave
100if(save_point eq 3) save_game 3 autosave
101if(save_point eq 4) save_game 4 autosave
102sleep 180
103co_message_display = 1
104}
105
106func void remove_ai(void)
107{
108ai2_kill
109sleep 60
110powerup_reset
111weapon_reset
112sleep 240
113corpse_reset
114}
115
116func void music_stop(void)
117{
118sound_music_stop mus_cool19
119sound_music_stop mus_atm_cl12lp
120sound_music_stop mus_low1
121sound_music_stop mus_fitec
122}
123
124#tv63 to tv73
125func void deathfall(void)
126{
127sleep 30
128cm_detach
129sleep 30
130chr_set_health 0 0
131}
132
133##########
134### SP1 ###
135##########
136
137### 1ST ROOF ###
138
139func void intro(void)
140{
141playback 0 IntroKonoko
142if(save_point ne 1) save_game 1 autosave
143chr_envanim_stop IntroNinja
144chr_teleport IntroNinja 600
145chr_facetoflag IntroNinja 600
146chr_animate IntroNinja NINCOMcrouch_idle
147ai2_passive IntroNinja 1
148ai2_setmovementmode IntroNinja creep
149sleep 40
150playback_block IntroNinja IntroNinja
151ai2_passive IntroNinja 0
152ai2_attack IntroNinja 0
153ai2_setalert A_Sr9 combat
154ai2_setjobstate A_Sr9
155objective_set 1 silent
156target_set 7006 0
157}
158
159#tv29 - crossing point to the lower floor
160func void t22(string ai_name)
161{
162ai2_dopath IntroNinja patrol_39
163ai2_setjobstate IntroNinja
164}
165
166#tv32 - box on the right side (enter func: t33in, levae func: t33out); I've disabled it
167#tv31 - box on the left side (enter func: t32in, levae func: t32out); I've disabled it
168
169#tv1 - above the abyss
170func void t1(string ai_name)
171{
172ai2_dopath IntroNinja patrol_40
173ai2_setjobstate IntroNinja
174ai2_dopath A_N1 patrol_02
175ai2_setjobstate A_N1
176ai2_dopath A_Sr9 patrol_09
177ai2_setjobstate A_Sr9
178ai2_spawn A_N7
179ai2_spawn A_N8
180}
181
182func void patrolscript0001(string ai_name)
183{
184playback_block IntroNinja ninja_jump5 interp 30
185}
186
187func void patrolscript0022(string ai_name)
188{
189playback_block IntroNinja ninja_jump4 interp 20
190}
191
192func void patrolscript0002(string ai_name)
193{
194playback_block A_N1 ninja_jump interp 30
195}
196
197func void patrolscript0005(string ai_name)
198{
199playback_block A_T4 tanker1 interp 20
200}
201
202func void patrolscript0004(string ai_name)
203{
204playback_block A_T6 tanker2 interp 20
205}
206
207### 2ND ROOF ###
208
209#tv55 - after the abyss, at the beginning of the 2nd roof (enter func: t57, leave func: t57b); I've disabled it
210
211### 3RD ROOF ###
212
213#tv56 - after the abyss, at the beginning of the 3rd roof
214func void t58(string ai_name)
215{
216sound_music_start mus_cool19 0.0
217sound_music_volume mus_cool19 0.75 3.0
218ai2_dopath IntroNinja patrol_51
219ai2_setjobstate IntroNinja
220ai2_dopath A_N1 patrol_50
221ai2_setjobstate A_N1
222ai2_dopath A_Sr9 patrol_49
223ai2_setjobstate A_Sr9
224ai2_spawn A_C5
225ai2_spawn A_Sr3
226ai2_spawn A_T4
227ai2_spawn A_T6
228particle b01_rain1 do start
229particle b01_rain2 do start
230particle b01_rain3 do start
231}
232
233#tv35 - after tv56 (func: rain1); I've disabled it
234
235### 4TH ROOF ###
236
237#tv4 - at the right side of the mast (func: t3); I've disabled it
238#tv2 - at the left side of the mast (func: t2); I've disabled it
239
240### 5TH ROOF ###
241
242#tv57 - after the abyss, at the beginning of the 5th roof (enter func: t59, leave func: t59b); I've disabled it
243#tv5 - on the right side after tv59 (func: t5); I've disabled it
244#tv4 - on the left side after tv59 (func: t4); I've disabled it
245#lose func of A_T4 and A_T6: music_stop
246#tv6 - around the place, where you find the hypo (func: t6); I've disabled it
247#tv7 - in front of the staircase to the higher floor (funnc: b01); not used
248#tv30 - under the passageway; near the place, where you find the shield (func: t31); I've disabled it
249#tv33 - after tv7 (func: t7); I've disabled it
250#tv34 - after tv33, on the right side after the staircase (func: b02); not used
251#tv8 - in front of tv38 (func: rain1); I've disabled it
252#tv37 - in front of tv38 (func: rain2); I've disabled it
253
254#tv36 - in front of the passage, from the left side to the right side
255func void t8(string ai_name)
256{
257music_stop
258chr_delete IntroNinja
259chr_delete A_N1
260chr_delete A_Sr9
261ai2_spawn B_Sr10
262ai2_spawn B_Sr10a
263ai2_spawn B_R11
264ai2_spawn B_R12a
265ai2_spawn B_Sr12
266ai2_spawn B_T13
267ai2_dopath A_T6 patrol_42
268ai2_setjobstate A_T6
269ai2_dopath A_T4 patrol_42
270ai2_setjobstate A_T4
271ai2_setjobstate A_Sr3
272ai2_setjobstate A_C5
273ai2_dopath A_N7 patrol_45
274ai2_setjobstate A_N7
275ai2_dopath A_N8 patrol_45
276ai2_setjobstate A_N8
277}
278
279func void patrolscript0011(string ai_name)
280{
281playback_block B_T13 tanker_jump interp 30
282}
283
284#tv39 - in the middle of the passage, from the left side to the right side (func: rain2); I've disabled it)
285#tv38 - in the middle of the passage, after tv39, from the left side to the right side (func: rain3); I've disabled it)
286
287#tv80 - after the passage, from the left side to the right side
288func void runup(void)
289{
290ai2_dopath B_Sr10 patrol_10z
291ai2_setjobstate B_Sr10
292particle b02_rain1 do start
293particle b02_rain2 do start
294particle b02_rain3 do start
295}
296
297### 6TH ROOF ###
298
299#tv9 - at the beginning of the 6th roof, from the left side to the right side
300func void t10(string ai_name)
301{
302sound_dialog_play c11_39_03konoko
303ai2_spawn B_SuperNinja
304chr_boss_shield B_SuperNinja
305chr_unstoppable B_SuperNinja 1
306chr_neutral B_SuperNinja 1
307playback_block B_SuperNinja superninja1 interp 20
308sleep 60
309chr_delete B_SuperNinja
310}
311
312#tv85 - at the same place as tv9 (enter func: t83, leave func: t83b); I've disabled it
313#tv41 - after tv85, from the left side to the right side (func: rain4); I've disabled it
314#tv40 - in some distance after tv 85, from the left side to the right side (enter func: rain5, leave func: t77); I've disabled it
315#tv58 - at the end of the 6th roof, where you can jump to the 7th roof (eneter func: t60, leave func: t60b); I've disabled it
316
317### 7TH ROOF ###
318
319#t42 - at the beginning of the 7th roof
320func void t11(string ai_name)
321{
322ai2_spawn C_N17
323ai2_spawn C_N18
324ai2_dopath B_T13 patrol_41
325ai2_setjobstate B_T13
326particle el1_locklight01 do start
327particle b03_rain1 do start
328particle b03_rain2 do start
329particle b03_rain3 do start
330}
331
332#tv10 - after tv42 (func: rain6); I've disabled it
333
334#tv74 - around the entrance of the elavator and in the elevator; used to count the enemies inside it; see next func
335
336#tv11 - in the middle of the elevator
337func void t12(string ai_name)
338{
339trigvolume_enable trigger_volume_12 0
340if(trigvolume_count(62) eq 0) Elevator
341else
342 {
343 sleep 60
344 trigvolume_enable trigger_volume_12 1
345 }
346}
347
348##########
349### SP2 ###
350##########
351
352func void Elevator(void)
353{
354sound_dialog_play c11_39_02konoko
355fade_out 0 0 0 30
356sleep 30
357load_s2
358chr_facetoflag 0 44
359chr_teleport 0 44
360fade_in 30
361}
362
363func void load_s2(void)
364{
365fork remove_ai
366if(save_point eq 2) restore_game
367ai2_spawn C_Sr15
368ai2_spawn C_T16
369ai2_spawn C_R55
370ai2_spawn C_N57
371ai2_spawn D_C19
372ai2_spawn D_Sb20
373ai2_spawn D_R21
374env_show 31 1
375objective_set 1 silent
376target_set 47 0
377}
378
379### 1ST ROOF ###
380
381func void patrolscript0077(string ai_name)
382{
383ai2_dopath D_R21 patrol_21
384ai2_setjobstate D_R21
385}
386
387#tv12 - after door 3
388func void s2(string ai_name)
389{
390if(save_point eq 2)
391 {
392 particle b03_rain1 do start
393 particle b03_rain2 do start
394 particle b03_rain3 do start
395 }
396else
397 {
398 save_game 2 autosave
399 particle b01_rain1 do stop
400 particle b01_rain2 do stop
401 particle b01_rain3 do stop
402 particle b02_rain1 do stop
403 particle b02_rain2 do stop
404 particle b02_rain3 do stop
405 }
406}
407
408#tv75 - after the stairs to the higher floor (func: t65); I've disabled it
409
410### 2ND ROOF ###
411
412#tv43 - complete 2nd roof (func: rain7); I've disabled it
413#tv48 - above the abyss, crossing from the 2nd roof to the 3rd roof (func: rain9); I've disabled it
414
415### 3RD ROOF ###
416
417#tv17 - at the beginning of the 3rd roof
418func void t18(string ai_name)
419{
420sound_music_start mus_atm_cl12lp 0.0
421sound_music_volume mus_atm_cl12lp 0.75 3.0
422particle b04_rain1 do start
423particle b04_rain2 do start
424particle b04_rain3 do start
425particle b04_rain4 do start
426particle b04_rain5 do start
427particle b04_rain6 do start
428}
429
430#tv48 - at the same place as tv17 (func: rain9); I've disabled it
431#tv45 - in some distance after tv48 (func: rain10); I've disabled it
432#tv46 - in some distance after tv45 (func: rain11); I've disabled it
433#tv47 - in some distance after tv46 (func: rain12); I've disabled it
434#tv53 - in some distance after tv47 (func: rain12); I've disabled it
435#tv49 - in some distance after tv53 (func: rain13); I've disabled it
436#tv76 - in some distance in front of of the end of the right "colonnade" (func: t77); I've disabled it
437#tv77 - at the end of the left "colonnade" (func: t78); I've disabled it
438
439#tv13 - at the end of the 3rd roof
440func void t14(string ai_name)
441{
442music_stop
443ai2_spawn D_Sb22
444ai2_spawn D_Sb23
445ai2_spawn D_Sr24
446ai2_spawn D_Sr38
447ai2_spawn D_C60
448ai2_dopath D_Sb20 patrol_35
449target_set 1 0
450particle b06_rain1 do start
451particle b06_rain2 do start
452particle b06_rain3 do start
453particle b06_rain4 do start
454particle b06_rain5 do start
455particle b06_rain6 do start
456}
457
458### 4TH ROOF ###
459
460func void patrolscript0014(string ai_name)
461{
462playback_block D_Sb20 striker_jump interp 20
463}
464
465#tv27 - ground floor, left passage, some distance after the beginning of the 2nd "block" (func: t30); I've disabled it
466
467#after the beginning of the center passage
468func void t19(string ai_name)
469{
470sound_music_start mus_low1 0.0
471sound_music_start mus_low1 0.75 3
472ai2_spawn D_N25
473ai2_spawn C_R61
474}
475
476#t19 - at the end of the center passage, after the left corner
477func void t20(string ai_name)
478{
479music_stop
480ai2_spawn D_Sr26
481ai2_spawn D_Sr27
482ai2_spawn D_T28
483}
484
485#tv54 - at the beginning of the stairs, where the tanker waits (func: cloudkiller); not used
486
487#t14 - next to last floor of the stairs
488func void t15(string ai_name)
489{
490powerup_spawn lsi 605
491ai2_spawn E_N14
492ai2_spawn E_N14a
493ai2_passive E_N14 1
494ai2_spawn NinjaZip
495ai2_passive NinjaZip 1
496chr_unstoppable NinjaZip 1
497playback NinjaZip NinjaZipSet
498playback E_N14 Ninja02Set
499}
500
501#tv15 - after the stairs
502func void NinjaZip(void)
503{
504chr_envanim NinjaZip ZipNinjaBipBox norotation
505chr_animate NinjaZip NINJAlev12_zip
506obj_create 72
507env_anim 72
508sleep 60
509playback E_N14 Ninja02Jump
510sleep 80
511ai2_passive E_N14 0
512sleep 100
513playback NinjaZip NinjaZipLeave
514sleep 120
515chr_delete NinjaZip
516objective_set 2 silent
517target_set 7006 0
518}
519
520#tv84 - around the place, where you find the zipline rider
521func void t28(string ai_name)
522{
523chr_wait_animtype char_0 Pickup_Object
524particle obj_zip create
525}
526
527#tv87 - at the end of the secret way
528func void t85(string ai_name)
529{
530ai2_spawn sbg_ninja
531}
532
533#tv16 - at the place with the yellow flashing circle
534func void t17(string ai_name)
535{
536if(chr_has_lsi(0)) KonokoZip
537}
538
539func void KonokoZip(void)
540{
541particle obj_zip kill
542chr_envanim 0 ZipKonBipBox norotation
543chr_animate 0 KONOKOlev12_zip
544obj_create 71
545env_anim 71
546sleep 55
547sound_ambient_start c08_11_19zip
548sleep 235
549obj_kill 72
550chr_peace 0
551objective_set 3 silent
552target_set 7006 0
553chr_delete D_C19
554chr_delete D_C60
555chr_delete D_N25
556chr_delete D_R21
557chr_delete D_Sb20
558chr_delete D_Sb22
559chr_delete D_Sb23
560chr_delete D_Sr24
561chr_delete D_Sr26
562chr_delete D_Sr27
563chr_delete D_Sr38
564particle b04_rain1 do stop
565particle b04_rain2 do stop
566particle b04_rain3 do stop
567particle b04_rain4 do stop
568particle b04_rain5 do stop
569particle b04_rain6 do stop
570}
571
572func void load_s3(void)
573{
574restore_game
575particle b06_rain1 do start
576zip_rider
577}
578
579func void zip_rider(void)
580{
581ai2_spawn E_N14
582ai2_spawn E_N14a
583obj_create 71
584env_anim 71
585chr_envanim_block E_N14a ZipKonBipBox norotation
586chr_animate_block E_N14a KONOKOlev12_zip
587sleep 60
588obj_create 72
589env_anim 72
590chr_envanim_block E_N14 ZipKonBipBox norotation
591chr_animate_block E_N14 KONOKOlev12_zip
592sleep 230
593ai2_attack E_N14a char_0
594sleep 60
595obj_kill 71
596ai2_attack E_N14 char_0
597}
598
599##########
600### SP3 ###
601##########
602
603### 1ST ROOF ###
604
605#tv59 - the place, where you arrive with your zip rider (func: set_objective_2); I've disabled it
606
607#tv78 - after tv59
608func void s3(string ai_name)
609{
610if(save_point ne 3)
611 {
612 save_game 3 autosave
613 zip_rider
614 }
615objective_set 3 silent
616target_set 7006 0
617}
618
619#tv24 - in some distance after tv59 (func: rain17); I've disabled it
620
621#tv28 - at the beginning of the passageway
622func void t9(string ai_name)
623{
624ai2_spawn E_C62
625playback E_C62 com
626ai2_spawn E_N37
627ai2_makeignoreplayer E_N37 1
628playback_block E_N37 ninja_jump2
629ai2_makeignoreplayer E_N37 0
630ai2_attack E_N37 char_0
631}
632
633#tv50 - at the beginning of the passageway (func: rain18); I've disabled it
634
635#tv20 - at the same place as tv50
636func void t21(string ai_name)
637{
638sound_dialog_play c11_39_04konoko
639ai2_spawn E_N29
640ai2_spawn E_Sb31
641ai2_spawn E_Sr63
642ai2_spawn E_Sr64
643ai2_spawn E_R65
644ai2_spawn E_SuperNinja
645chr_boss_shield E_SuperNinja
646chr_unstoppable E_SuperNinja
647playback_block E_SuperNinja superninja2 interp 20
648sleep 60
649chr_delete E_SuperNinja
650}
651
652#tv79 - around the place, where you find the hypo (func: t80); I've disabled it
653
654### 2ND ROOF ###
655
656#tv26 - on the next to last floor
657func void t29(string ai_name)
658{
659sound_dialog_play c11_39_05konoko
660}
661
662#tv86 - at the beginning of the highest floor (enter func: t84, leave func: t84b); I've disabled it
663#tv51 - at the same place as tv86 (func: rain19); I've disabled it
664
665#tv83 - after the beginning of the stairs
666func void t95(string ai_name)
667{
668sound_dialog_play c11_39_06konoko
669ai2_spawn E_Sr30
670}
671
672#tv52 - at the end of the small passage after the end of the stairs (func: rain20); I've disabled it
673#tv21 - after tv52 (func: t23); I've disabled it
674
675#tv83 - at the 1st corner (beside the "block", where the sniper with the mercury bow stands on)
676func void t96(string ai_name)
677{
678sound_dialog_play c11_39_07konoko
679}
680
681#tv23 - at the 2nd corner
682func void t25(string ai_name)
683{
684ai2_spawn E_Sr33
685ai2_dopath E_Sr30 patrol_34
686ai2_setjobstate E_Sr30
687}
688
689#tv22 - at the 3rd corner
690func void t24(string ai_name)
691{
692sound_dialog_play c11_39_08konoko
693ai2_spawn E_R32
694ai2_dopath E_Sr33 patrol_34
695ai2_setjobstate E_Sr33
696door_lock 6
697}
698
699#tv61 - complete area between the 3rd corner and the 4th corner; used to count the enemies inside it; see next func
700
701#tv60 - in front of the doors of the elevator
702func void t63(string ai_name)
703{
704trigvolume_enable trigger_volume_63 0
705if (trigvolume_count(64) eq 0) door_unlock 6
706else
707 {
708 sleep 60
709 trigvolume_enable trigger_volume_63 1
710 }
711}
712
713#tv25 - in the middle of the elevator
714func void ninja(void)
715{
716fade_out 0 0 0 30
717sleep 30
718sound_dialog_play c11_39_09konoko
719chr_facetoflag 0 9523
720chr_teleport 0 9523
721obj_kill 72
722door_lock 2
723load_s4_part1
724fade_in 30
725load_s4_part2
726}
727
728##########
729### SP4 ###
730##########
731
732func void load_s4_all(void)
733{
734load_s4_part1
735load_s4_part2
736}
737
738func void load_s4_part1(void)
739{
740fork remove_ai
741particle wind do start
742ai2_spawn OutroNinja
743chr_boss_shield OutroNinja
744chr_nocollision OutroNinja 1
745playback OutroNinja SuperNinjaSet
746}
747
748func void load_s4_part2(void)
749{
750if(save_point eq 4)
751 {
752 restore_game
753 particle b06_rain6 do start
754 objective_set 3 silent
755 }
756else
757 {
758 particle b06_rain1 do stop
759 particle b06_rain2 do stop
760 particle b06_rain3 do stop
761 particle b06_rain4 do stop
762 particle b06_rain5 do stop
763 save_game 4 autosave
764 }
765sleep 1
766sound_music_start mus_fitec
767chr_animate OutroNinja NINCOMteleport_in 47
768sleep 40
769playback OutroNinja SuperNinjaDone
770chr_animate OutroNinja NINCOMteleport_out 31
771chr_nocollision OutroNinja 0
772}
773
774func void outro(void)
775{
776fade_out 0 0 0 30
777sleep 30
778win
779}
Note: See TracBrowser for help on using the repository browser.