source: nikanabo/current/bsl/onilight/IGMD/power_II/power2.bsl@ 1049

Last change on this file since 1049 was 185, checked in by geyser, 18 years ago
File size: 14.4 KB
RevLine 
[185]1#################
2### VARIABLES ###
3#################
4
5var int var_counter = 0;
6
7############
8### MAIN ###
9############
10
11func void main(void)
12{
13gl_fog_red = 0
14gl_fog_blue = 0
15gl_fog_green = 0
16gl_fog_start = .995
17gs_farclipplane_set 5000
18ui_suppress_prompt = 1
19chr_auto_aim_dist = 0
20start
21}
22
23#############
24### START ###
25#############
26
27func void start(string ai_name)
28{
29fork deactivate_stuff
30if(save_point eq 0) fork intro
31if(save_point eq 1) restore_game
32if(save_point eq 2) fork save_point_2
33if(save_point eq 3) restore_game
34sleep 5
35fork sp_all
36}
37
38func void deactivate_stuff(void)
39{
40#not used
41trigvolume_enable crossfire 0
42trigvolume_enable open_ambush_1 0
43trigvolume_enable save2 0
44trigvolume_enable save_point3 0
45trigvolume_enable setobjective_4 0
46trigvolume_enable setobjective_5 0
47trigvolume_enable strikerguards 0
48trigvolume_enable room1_copy_copy 0
49trigvolume_enable room1_copy2 0
50trigvolume_enable room2 0
51trigvolume_enable room2_copy 0
52trigvolume_enable room2_stop 0
53trigvolume_enable room2_stop_copy2 0
54trigvolume_enable room2_stop_copy_copy 0
55trigvolume_enable room2_stop_copy 0
56trigvolume_enable room3_stop 0
57trigvolume_enable room3_stop_copy 0
58trigvolume_enable room3_particle_control 0
59trigvolume_enable room4_copy 0
60trigvolume_enable room4_copy_copy 0
61trigvolume_enable trigger_volume_07 0
62trigvolume_enable trigger_volume_11_copy 0
63trigvolume_enable trigger_volume_16_copy3 0
64trigvolume_enable trigger_volume_16_copy_copy2 0
65trigvolume_enable trigger_volume_16_copy2_copy2 0
66trigvolume_enable trigger_volume_16_copy_copy_copy2 0
67trigvolume_enable trigger_volume_16_copy2_copy_copy 0
68trigvolume_enable trigger_volume_16_copy_copy_copy_copy 0
69trigvolume_enable trigger_volume_36 0
70trigvolume_enable trigger_volume_39 0
71#used
72obj_create 81 82
73env_shade 777 777 .4 .4 .4
74env_show 778 0
75chr_delete ShinShin
76}
77
78func void you_lose(string ai_name)
79{
80fade_out 0 0 0 30
81sleep 30
82lose
83}
84
85####################################
86### SEVERAL TIMES USED FUNCTIONS ###
87####################################
88
89func void sp_all(void)
90{
91co_message_display = 0
92if(save_point eq 1) save_game 1 autosave
93if(save_point eq 2) save_game 2 autosave
94if(save_point eq 3) save_game 3 autosave
95sleep 180
96co_message_display = 1
97}
98
99func void remove_ai(void)
100{
101ai2_kill
102sleep 60
103powerup_reset
104weapon_reset
105sleep 240
106corpse_reset
107}
108
109func void music_stop(void)
110{
111sound_music_stop mus_trt
112sound_music_stop atm_cl09
113sound_music_stop atm_cl10
114sound_music_stop atm_cl11
115sound_music_stop atm_cl12
116sound_music_stop mus_amasian
117}
118
119#tv66, tv67 and tv68 - called up, if you fall from a pipe
120func void dont_even_try_it(string ai_name)
121{
122chr_set_health 0 0
123}
124
125##########
126### SP0 ###
127##########
128
129func void intro(void)
130{
131particle room1 do start
132particle room2 do start
133particle room3 do start
134ai2_spawn ambush_striker_10
135ai2_spawn ambush_striker_11
136playback 0 IntroKonoko01
137objective_set 1 silent
138sleep 1
139sound_music_start mus_trt
140}
141
142#tv1 - big long box around the railing and the beginning of the stairway
143func void p1(string ai_name)
144{
145music_stop
146sound_music_start atm_cl09 1.0
147ai2_spawn A1_sr01
148ai2_spawn A1_t02
149ai2_lookatme A1_sr01
150ai2_lookatme A1_t02
151sleep 120
152door_lock 1
153door_lock 2
154}
155
156#lose func of A1_t02
157func void backup_1(string ai_name)
158{
159ai2_spawn backup_striker1
160particle blast1_locklight01 do start
161door_unlock 1
162door_open 1
163}
164
165#lose func of A1_sr01
166func void backup_2(string ai_name)
167{
168ai2_spawn backup_striker2
169particle blast2_locklight01 do start
170door_unlock 2
171door_open 2
172}
173
174#tv41 - long box in middle of the 1st hall (proceed from the left to the right side); not used, or better: does not work
175
176#tv2 - after door 1 and door 2
177func void p2(string ai_name)
178{
179ai2_spawn A2_r03
180playback A2_r03 redjump
181ai2_lookatme A2_r03
182ai2_spawn aerial_red_2
183ai2_passive aerial_red_2 1
184playback aerial_red_2 redjump2
185ai2_passive aerial_red_2 0
186ai2_lookatme aerial_red_2
187ai2_spawn red_guard_1
188ai2_dopath A1_sr01 patrol_31
189ai2_dopath A1_t02 patrol_31
190ai2_setjobstate A1_sr01
191ai2_setjobstate A1_t02 patrol_31
192ai2_spawn ShinShin force
193playback ShinShin ShinShinSet
194ai2_setmovementmode ShinShin creep
195ai2_passive ShinShin 1
196ai2_makeblind ShinShin 1
197ai2_makedeaf ShinShin 1
198chr_lock_active ShinShin
199chr_unstoppable ShinShin 1
200chr_invincible ShinShin 1
201chr_nocollision ShinShin 1
202}
203
204#tv34 - complete volume of the 2nd hall - enter func
205func void t43(string ai_name)
206{
207var_counter = 1
208}
209
210#tv34 - complete volume of the 2nd hall - leave func
211func void t43b(string ai_name)
212{
213var_counter = 0
214}
215
216#tv63 - long box in middle of the 2nd hall (proceed from the left to the right side)
217func void come_to_me(string ai_name)
218{
219ai2_dopath ambush_striker1 come_to_me 1
220ai2_dopath ambush_striker2 come_to_me 1
221ai2_dopath A1_t02 come_to_me 1
222ai2_dopath A1_sr01 come_to_me 1
223}
224
225#tv65 - complete second half of the 2nd hall; only used to check, if there are still enemies in it or not; see next func
226
227#tv3 - big field around shinatama
228func void shin_check(string ai_name)
229{
230trigvolume_enable trigger_volume_03 0
231if(trigvolume_count(32) eq 0) Shin
232else
233 {
234 sleep 60
235 trigvolume_enable trigger_volume_03 1
236 }
237}
238
239#tv54 - complete volume of the 2nd hall too; used to delete all enemies inside; see next func
240
241func void Shin(void)
242{
243music_stop
244sound_music_start atm_cl10 0.0
245sound_music_volume atm_cl10 1 5
246objective_set 2 silent
247target_set 7020 60
248particle blast1_locklight01 do stop
249particle blast2_locklight01 do stop
250door_lock 1
251door_lock 2
252particle room1 do stop
253particle room2 do stop
254particle Shindoor_locklight01 do start
255door_unlock 3
256particle room4 do start
257ai2_spawn A2_sb04
258sound_dialog_play c09_31_27shinatama
259sound_dialog_play_block pause
260sleep 600
261sound_dialog_play c09_31_28shinatama
262sleep 600
263sound_dialog_play c09_31_29shinatama
264sleep 330
265sound_dialog_play_block pause
266sleep 15
267music_stop
268sound_ambient_start c06_45_04_explo
269sleep 10
270particle ShinBomb do explode
271trigvolume_kill 64
272if(var_counter ne 0) chr_set_health 0 0
273else
274 {
275 fade_out 1 1 1 30
276 sleep 2
277 fade_in 30
278 door_lock 3
279 particle Shindoor_locklight01 do stop
280 objective_set 3 silent
281 target_set 0 0
282 }
283}
284
285#tv4 - in front of door 3
286func void p5(string ai_name)
287{
288ai2_spawn A3_n05
289ai2_spawn A3_sb06
290}
291
292##########
293### SP1 ###
294##########
295
296#tv69 - in some distance afer door 3
297func void new_save1(string ai_name)
298{
299if(save_point eq 1)
300 {
301 p5
302 particle room4 do start
303 objective_set 3 silent
304 }
305else save_game 1 autosave
306particle Shindoor_locklight01 do stop
307door_close 3
308door_lock 3
309particle room3 do stop
310}
311
312#called up, after you've talked to the guy
313func void do_console_1(string ai_name)
314{
315ai2_doalarm A3_n05 1
316}
317
318#console1
319func void pipe1a(string ai_name)
320{
321ai2_passive A3_n05 1
322particle room4 do stop
323timer_start 30 pipe1b
324sound_music_start atm_cl11
325}
326
327func void pipe1b(void)
328{
329particle room4 do start
330console_reset 1
331music_stop
332}
333
334#tv29 - on the pipe, in some distance after door 4 (func: p36); I've disabled it
335
336#tv28 - after door 9
337func void killmuro(string ai_name)
338{
339music_stop
340ai2_spawn A4_n07
341}
342
343#tv5 - in front of door 10
344func void p6(string ai_name)
345{
346ai2_spawn A4_sr08
347ai2_spawn B1_c07
348}
349
350#tv6 - after door 13 and door 14, not used (func: p7)
351
352#tv7 - in the middle of the stairs from 1st floor to 2nd floor
353func void p8(string ai_name)
354{
355trigvolume_enable trigger_volume_08 0
356ai2_spawn B2_sb09
357ai2_spawn B2_n10
358}
359
360#tv49 - after door 11 and door 12
361func void p9(string ai_name)
362{
363ai2_spawn C1_c16
364ai2_spawn C1_t11
365ai2_spawn C1_sb12
366ai2_spawn C1_t13
367ai2_spawn C2_sg15
368ai2_spawn C2_sr17
369ai2_spawn C2_sb14
370ai2_spawn C2_t19
371}
372
373#console6
374func void zap_cinematic(string ai_name)
375{
376particle doorA_locklight01 do start
377particle doorB_locklight01 do start
378door_unlock 15
379ai2_spawn vat_bot_1
380ai2_spawn vat_bot_2
381ai2_spawn vat_bot_3
382ai2_spawn vat_bot_4
383ai2_spawn vat_bot_5
384chr_weapon_immune vat_bot_1
385chr_weapon_immune vat_bot_2
386chr_weapon_immune vat_bot_3
387chr_weapon_immune vat_bot_4
388chr_weapon_immune vat_bot_5
389particle vatroom1 do start
390particle zap1 create
391particle zap2 create
392particle zap3 create
393trigvolume_enable save2 1
394sleep 1
395sound_music_start atm_cl12 0.75
396}
397
398##########
399### SP2 ###
400##########
401
402#tv25 - after door 15
403func void save_point_2(string ai_name)
404{
405if(save_point eq 2)
406 {
407 restore_game
408 zap_cinematic
409 objective_set 4 silent
410 }
411else save_game 2 autosave
412particle doorA_locklight01 do stop
413door_close 15
414door_lock 15
415particle room4 do stop
416}
417
418#tv64 - complete volume of the vat room (from the floor, where Konoko stands nearly to the ceiling)
419func void zap_start(string ai_name)
420{
421trigvolume_enable zap1 0
422if(var_counter eq 0)
423 {
424 particle zap1 do start
425 sleep 120
426 particle zap1 do stop
427 }
428if(var_counter eq 0)
429 {
430 particle zap2 do start
431 sleep 120
432 particle zap2 do stop
433 }
434if(var_counter eq 0)
435 {
436 particle zap3 do start
437 sleep 120
438 particle zap3 do stop
439 }
440sleep 60
441trigvolume_enable zap1 1
442}
443
444#1st console 4
445func void zap_timer_1(string ai_name)
446{
447var_counter = 1
448timer_start 15 zap_start_again
449}
450
451#tv60 - passage to the 1st console 4
452func void change_patrol_1(string ai_name)
453{
454ai2_dopath vat_bot_2 vat_bot_2b 1
455}
456
457#2nd console 4
458func void zap_timer_2(string ai_name)
459{
460var_counter = 1
461timer_start 10 zap_start_again
462}
463
464#tv61 - passage to the 2nd console 4
465func void change_patrol_2(string ai_name)
466{
467ai2_dopath vat_bot_3 vat_bot_3b 1
468}
469
470#3rd console 4
471func void zap_timer_3(string ai_name)
472{
473var_counter = 1
474timer_start 5 zap_start_again
475}
476
477#tv62 - passage to the 3rd console 4
478func void change_patrol_3(string ai_name)
479{
480ai2_dopath vat_bot_5 vat_bot_5b 1
481}
482
483func void zap_start_again(string ai_name)
484{
485var_counter = 0
486console_reset 4
487}
488
489#tv35 to tv40 - called up, if a chara falls into the acid
490func void splash(string character)
491{
492if(chr_is_player(character) eq 1)
493 {
494 cm_detach
495 chr_animate 0 KONOKOacid
496 sleep 10
497 sound_impulse_play konoko_gruesome_death
498 chr_set_health 0 0
499 }
500else
501 {
502 chr_animate(character, KONOKOacid);
503 sleep 10
504 chr_set_health(character, 0);
505 }
506}
507
508#after door 16
509func void red_ambush(string ai_name)
510{
511music_stop
512ai2_spawn ambush_red_1
513}
514
515#tv10 - after door 19 and door 20
516func void p10(string ai_name)
517{
518ai2_spawn D1_sr20
519ai2_spawn D1_sb21
520particle doorB_locklight01 do stop
521door_lock 16
522particle zap1 kill
523particle zap2 kill
524particle zap3 kill
525particle vatroom1 do stop
526trigvolume_enable strikerguards 1
527}
528
529#tv9 - long box (from the left side to the right side) in some distance in front of door 21
530func void striker_guards(string ai_name)
531{
532ai2_spawn striker_guard_1
533ai2_spawn striker_guard_2
534particle room6 do start
535}
536
537#tv51 - in front of door 21 (func: striker_guards); I've disabled it
538#tv31 - in front of door 21 too (func: p11); I've disabled it too
539#tv50 - after door 21 (func: cross_fire); I've disabled it
540
541#tv10 - after door 22
542func void p12(string ai_name)
543{
544ai2_spawn D2_sg24
545ai2_spawn D2_f25
546ai2_spawn D2_sb26
547playback D2_sb26 piperun
548ai2_spawn pipe_guard_1
549ai2_spawn pipe_guard_2
550}
551
552#console8
553func void pipe2a(void)
554{
555particle room6 do stop
556timer_start 30 pipe2b
557sound_music_start atm_cl11
558}
559
560func void pipe2b(void)
561{
562music_off
563particle room6 do start
564console_reset 8
565}
566
567#tv58 - after door 27
568func void pipe2_music_off(void)
569{
570music_stop
571particle save3_locklight01 do start
572}
573
574#tv11 - in front of door 28
575func void p13(string ai_name)
576{
577ai2_spawn E1_sr28
578ai2_spawn E1_sb29
579ai2_spawn E1_sr30
580ai2_spawn ambush_comguy_1
581ai2_spawn E1_n31
582ai2_spawn E1_n32
583ai2_spawn E1_n37
584particle pipe3 do create
585particle pipe3 do start
586}
587
588#tv33 - after door 33 (funcs: p11 and save_point_3); I've disabled it
589
590##########
591### SP3 ###
592##########
593
594#tv 32 - in some distance after door 28
595func void p11b(string ai_name)
596{
597trigvolume_enable p11b_vol 0
598if(save_point eq 3) p13
599else save_game 3 autosave
600particle save3_locklight01 do stop
601door_close 28
602door_lock 28
603objective_set 5 silent
604particle room6 do stop
605}
606
607#lose func of E1_sr30
608func void warnbigroom(string ai_name)
609{
610ai2_makeaware E1_sr28 char_0
611ai2_makeaware E1_sb29 char_0
612}
613
614#tv48 - 1st floor, at the beginning of the stairs to the 2nd floor
615func void spawn_EC_guards(string ai_name)
616{
617ai2_spawn E1_sb29
618ai2_spawn E1_c33
619ai2_spawn E1_c40
620ai2_spawn E1_f34
621ai2_spawn E1_f40
622ai2_spawn E1_f35
623}
624
625#tv53 - at the same place as tv48 (func: set_objective_5); I've disabled it
626
627#tv59 - 3rd floor, at the beginning of the stairs to the 4th floor
628func void final_guards(string ai_name)
629{
630ai2_spawn final_guard_1
631ai2_spawn final_guard_2
632}
633
634#console14
635func void tctf_control(string ai_name)
636{
637sound_music_start mus_amasian 1.0
638particle elev1_locklight01 do start
639particle elev2_locklight01 do start
640door_unlock 37
641door_unlock 38
642ai2_spawn E2_sr38
643ai2_spawn E2_sr39
644}
645
646#tv30 - in front of door 37 (func: p39); I've disabled it
647
648#tv12 - after door 37
649func void elevator(void)
650{
651fade_out 0 0 0 30
652sleep 30
653fork_rmove_ai
654env_show 778 1
655env_shade 778 778 .3 .3 .3
656ai2_spawn F_r40
657playback 0 ElevatorTop
658fade_in 30
659fork wait_for_help
660}
661
662func void wait_for_help(void)
663{
664chr_wait_health F_r40 70
665ai2_spawn TCTF1051
666ai2_spawn TCTF1052
667ai2_spawn TCTF1053
668ai2_spawn TCTF1054
669chr_lock_active 1051
670chr_lock_active 1052
671chr_lock_active 1053
672chr_lock_active 1054
673chr_changeteam TCTF1051 TCTF
674chr_changeteam TCTF1052 TCTF
675chr_changeteam TCTF1053 TCTF
676chr_changeteam TCTF1054 TCTF
677playback TCTF1051 OutroSwatEnter
678ai2_attack TCTF1053 char_0
679sleep 60
680playback TCTF1052 OutroSwatEnter
681ai2_attack TCTF1054 char_0
682sleep 50
683playback TCTF1053 OutroLiteEnter
684ai2_attack TCTF1051 char_0
685sleep 70
686playback TCTF1054 OutroLiteEnter
687ai2_attack TCTF1052 char_0
688}
689
690#console15
691func void pipe3(void)
692{
693sound_music_volume mus_amasian 0 2
694music_stop
695particle pipe3 kill
696sound_music_start atm_cl11
697timer_start 20 pipe3b
698}
699
700func void pipe3b(void)
701{
702music_stop
703particle pipe3 do create
704particle pipe3 do start
705console_reset 15
706}
707
708#tv13 - after door 39; circa after a quarter of the lenght of the pipe
709func void outro(void)
710{
711fade_out 0 0 0 30
712sleep 30
713win
714}
715
716#####################
717### TEXT CONSOLES ###
718#####################
719
720func void level10a(string chr_index)
721{
722text_console level_10a
723console_reset 2
724}
725
726func void level10b(string chr_index)
727{
728text_console level_10b
729console_reset 7
730}
Note: See TracBrowser for help on using the repository browser.