source: nikanabo/current/bsl/onilight/IGMD/lab/lab.bsl @ 185

Last change on this file since 185 was 185, checked in by geyser, 14 years ago
File size: 12.9 KB
Line 
1#################
2### VARIABLES ###
3#################
4
5var int var_counter = 0;
6
7############
8### MAIN ###
9############
10
11func void main(void)
12{
13gl_fog_red = .30
14gl_fog_blue = .15
15gl_fog_green = .17
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{
29if(save_point eq 0) save_point = 1
30if(save_point eq 1) fork intro
31if (save_point eq 2) restore_game
32if (save_point eq 3) restore_game
33sleep 5
34fork sp_all
35}
36
37func void deactivate_stuff(void)
38{
39#not used
40trigvolume_enable floor1 0
41trigvolume_enable save_1_trig 0
42trigvolume_enable save_3_trig 0
43trigvolume_enable sapperdamageon 0
44trigvolume_enable trigger_volume_36 0
45trigvolume_enable trigger_volume_36_copy 0
46trigvolume_enable trigger_volume_36_copy_copy 0
47#used
48trigvolume_enable outro_volume_1 0
49trigvolume_enable attack_trigger 0
50trigvolume_enable final_ambush 0
51env_show 776 0
52env_show 777 0
53obj_create 2 7
54}
55
56func void you_lose(string ai_name)
57{
58fade_out 0 0 0 30
59sleep 30
60lose
61}
62
63####################################
64### SEVERAL TIMES USED FUNCTIONS ###
65####################################
66
67func void sp_all(void)
68{
69co_message_display = 0
70if(save_point eq 1) save_game 1 autosave
71if(save_point eq 2) save_game 2 autosave
72if(save_point eq 3) save_game 3 autosave
73sleep 180
74co_message_display = 1
75}
76
77func void remove_ai(void)
78{
79ai2_kill
80sleep 60
81powerup_reset
82weapon_reset
83sleep 240
84corpse_reset
85}
86
87func void music_stop(void)
88{
89sound_music_stop mus_main01_hd
90sound_music_stop mus_main03
91}
92
93##########
94### SP1 ###
95##########
96
97func void intro(void)
98{
99ai2_spawn Barabus
100ai2_attack Barabus konoko
101playback 0 IntroKonoko01
102chr_inv_reset 0
103env_show 8 1
104env_show 9 1
105env_show 10 1
106objective_set 1 silent
107sleep 1
108sound_music_start mus_main01_hd 0.8
109}
110
111#tv31 - at the place, where Konoko gets off the bike (inside func: save_game_1); I've disabled it
112
113#lose func of Barabus
114func void rocket(void)
115{
116music_stop
117chr_animate Barabus STRIKEknockdown1
118fade_out 0 0 0 30
119sleep 30
120chr_animate_block Barabus BARABlev3_rocket
121chr_envanim Barabus RocketBox01
122sound_ambient_start c01_00_02barjet
123particle lock99_locklight01 do start
124door_unlock 43
125objective_set 2 silent
126target_set 143 30
127fade_in 30
128sleep 360
129chr_delete Barabus
130sleep 600
131sound_dialog_play c00_01_98shinatama
132}
133
134#tv22 - if you look to the gate, on the left, around the place where you find the plasma gun
135func void spawn_right_patrol(string ai_name)
136{
137ai2_spawn right_patrol_striker_1
138}
139
140#tv23 - between the last pillar and the 5 glass doors
141func void spawn_back_patrol(string ai_name)
142{
143ai2_spawn back_patrol_striker_1
144ai2_spawn back_patrol_striker_2
145}
146
147#tv21 - if you look to the gate, on the right, nearly at the end of the way
148func void spawn_left_patrol(string ai_name)
149{
150ai2_spawn left_patrol_striker_1
151}
152
153#tv8 - in front of door 43 (func: spawn_floor1_guards); I've disabled it
154
155##########
156### SP2 ###
157##########
158
159### GROUND FLOOR ###
160
161#tv33 - after door 43
162func void turnoffcompass(string ai_name)
163{
164if(save_point ne 2)
165        {
166        save_game 2 autosave   
167        target_set 143 0
168        }
169ai2_spawn Floor1_Striker_1
170ai2_spawn Floor1_Striker_2
171ai2_spawn Floor1_Sci_1
172ai2_spawn Floor1_Sci_2
173ai2_spawn Floor1_Sci_3
174ai2_spawn Floor1_Sci_4
175objective_set 3 silent
176tr_write_animation KONCOMpunch_heavy tramph.txt
177}
178
179#tv35 - complete room with console 2 (no funcs); I've disabled it
180
181#console 2
182func void unlock_floor1_doors(string ai_name)
183{
184particle lock1_locklight01 do start
185particle lock4a_locklight01 do start
186door_unlock 3
187door_unlock 8
188door_unlock 11
189door_unlock 14
190door_unlock 17
191door_unlock 20
192door_unlock 23
193door_unlock 26
194check_doors
195}
196
197#tv3 - long box in some distance after door 3, door 14, door 20 and door 26
198func void spawn_floor1_striker_11(string ai_name)
199{
200ai2_spawn Floor1_Striker_11
201ai2_spawn Floor1_Striker_12
202}
203
204#tv4 - long box in some distance after door 8, door 11, door 17 and door 23
205func void spawn_floor1_striker_10(string ai_name)
206{
207ai2_spawn Floor1_Striker_10
208ai2_spawn Floor1_Striker_12
209}
210
211#tv1 - in front of the stairs
212func void spawn_floor2_guards(string ai_name)
213{
214ai2_spawn Floor2_Striker_2
215ai2_spawn Floor2_Striker_3
216ai2_spawn Floor2_Striker_4
217sleep 15
218ai2_spawn Floor2_Striker_1
219ai2_doalarm Floor2_Striker_1 3
220sleep 15
221ai2_spawn Floor2_Sci_1
222ai2_spawn Floor2_Sci_2
223ai2_spawn Floor2_Sci_3
224ai2_spawn Floor2_Sci_4
225ai2_spawn Floor2_Sci_5
226}
227
228#tv10 - on the platform between the ground floor and the first floor
229func void set_target_4(string chr_index)
230{
231sound_dialog_play c00_01_26shinatama
232target_set 253 30
233}
234
235### FIRST FLOOR ###
236
237#tv36 - complete room with console 3 (no funcs); I've disabled it
238
239#console 3
240func void unlock_floor2_doors(void)
241{
242trigvolume_enable attack_trigger 1
243particle lock2_locklight01 do start
244particle lock4b_locklight01 do start
245door_unlock 2
246door_unlock 9
247door_unlock 12
248door_unlock 15
249door_unlock 18
250door_unlock 21
251door_unlock 24
252door_unlock 27
253check_doors
254sleep 60
255ai2_dopath Floor2_Striker_1 Floor2_Stk_1
256ai2_setjobstate Floor2_Striker_1
257}
258
259#tv24 - after door 6; outside of the room with console 3 (tv name: attack_trigger)
260func void commence_attack(string ai_name)
261{
262ai2_setalert Floor2_Striker_2 high
263ai2_setalert Floor2_Striker_3 high
264ai2_setalert Floor2_Striker_4 high
265ai2_dopath Floor2_Striker_1 Floor2_Stk_1
266ai2_dopath Floor2_Striker_2 scram_path
267ai2_dopath Floor2_Striker_3 attack_path_1
268ai2_dopath Floor2_Striker_4 attack_path_2
269ai2_setjobstate Floor2_Striker_1
270ai2_setjobstate Floor2_Striker_2
271ai2_setjobstate Floor2_Striker_3
272ai2_setjobstate Floor2_Striker_4
273ai2_attack Floor2_Striker_4 Floor2_Sci_4
274ai2_attack Floor2_Striker_3 Floor2_Sci_1
275}
276
277#lose func of Floor2_Sci_4
278func void death_sentence_1(string ai_name)
279{
280ai2_attack Floor2_Striker_4 Floor2_Sci_5
281}
282
283#lose func of Floor2_Sci_1
284func void death_sentence_2(string ai_name)
285{
286ai2_attack Floor2_Striker_3 Floor2_Sci_2
287}
288
289#lose func of Floor2_Sci_2
290func void death_sentence_3(string ai_name)
291{
292ai2_attack Floor2_Striker_3 Floor2_Sci_3
293}
294
295#tv2 - in front of the stairs
296func void spawn_floor3_guards(string ai_name)
297{
298ai2_spawn Floor3_Striker_1
299ai2_spawn Floor3_Striker_2
300ai2_spawn Floor3_Striker_3
301ai2_spawn Floor3_Comguy_1
302}
303
304#tv11 - on the platform between the first and the second floor
305func void set_target_5(string chr_index)
306{
307sound_dialog_play c00_01_28shinatama
308target_set 254 30
309}
310
311### SECOND FLOOR ###
312
313#tv37 - complete room with console 4 (no funcs); I've disabled it
314
315#console 4
316func void unlock_floor3_doors(string ai_name)
317{
318particle lock3_locklight01 do start
319particle lock4c_locklight01 do start
320door_unlock 1
321door_unlock 10
322door_unlock 13
323door_unlock 16
324door_unlock 19
325door_unlock 22
326door_unlock 25
327door_unlock 28
328check_doors
329}
330
331### ROOF ###
332
333#tv12 - in front of door 4
334func void set_objective_4(string chr_index)
335{
336sound_dialog_play c00_01_19shinatama
337objective_set 4 silent
338target_set 110 30
339}
340
341#tv30 - in some distance after the ramp to the lower roof; box from left to right
342func void roof_surprise(string ai_name)
343{
344ai2_dopath Roof_Striker_3 Roof_Striker_3b
345ai2_setjobstate Roof_Striker_3
346}
347
348#tv5 - after door 39
349func void spawn_tower_guards(string ai_name)
350{
351ai2_spawn Tower_Striker_1
352ai2_spawn Tower_Striker_2
353}
354
355#tv18 - after door 41; on the right side
356func void tower_lock_1(string chr_index)
357{
358ai2_spawn Tower_MB_1
359particle sapper do start
360music_stop
361}
362
363#tv17 - right next to the furniture in the middle of the tower; from left to right (entry func: sapper_damage_on); I've disabled it
364
365#lose func of Tower_MB_1
366func void bomber(void)
367{
368fade_out 0 0 0 30
369sleep 30
370chr_delete Tower_MB_1
371fork remove_ai
372particle sapper do stop
373chr_teleport 0 99
374chr_facetoflag 0 90
375fade_in 30
376}
377
378##########
379### SP3 ###
380##########
381
382### LOBBY - GROUND FLOOR ###
383
384#tv9 - in front of door 35; in the elevator shaft
385func void spawn_lobby_tctf(string ai_name)
386{
387if(save_point ne 3)
388        {
389        sleep 30
390        save_game 3 autosave
391        }
392env_show 540 0
393env_show 777 1
394env_show 778 0
395ai2_spawn Lobby_TCL_1
396ai2_spawn Lobby_TCL_2
397ai2_spawn Lobby_TCS_1
398objective_set 5 silent
399target_set 142 30
400}
401
402#tv34 - after door 35 (inside func: save_game_3); I've disabled it
403
404#tv13 - big box from door 59 and door 60 to the opposite wall; includes console 1
405func void spawn_lobby_synd(string ai_name)
406{
407ai2_spawn Lobby_Striker_1
408ai2_spawn Lobby_Striker_2
409ai2_spawn Lobby_Striker_3
410ai2_spawn Lobby_Striker_4
411}
412
413#hit func of Lobby_TCL_1
414func void Lobby_Hurt_TCL_1(string ai_name)
415{
416ai2_dopath Lobby_TCL_1 Lobby_Hurt_TCL_1
417}
418
419#hit func of Lobby_TCL_2
420func void Lobby_Hurt_TCL_2(string ai_name)
421{
422sleep 120
423ai2_dopath Lobby_TCL_2 Lobby_Hurt_TCL_2
424}
425
426#tv32 - at the end of the stairs to the lower floor with console 11; big box from left to right
427func void backdoor(string ai_name)
428{
429ai2_spawn backdoor_striker_1
430ai2_spawn backdoor_striker_3
431}
432
433#console 11
434func void passage_1(string ai_name)
435{
436particle lock69a_locklight01 do start
437check_doors
438}
439
440### LOBBY - FIRST FLOOR ###
441
442#tv28 - long box; starts in some after door 53 and ends in front of console 9
443func void spawn_lively_2(string ai_name)
444{
445ai2_spawn lively_striker_2
446}
447
448#console 9
449func void passage_2(string ai_name)
450{
451particle lock69b_locklight01 do start
452check_doors
453}
454
455#tv26 - in some distance after door 37
456func void spawn_opposite_striker_1(string ai_name)
457{
458ai2_spawn opposite_striker_1
459}
460
461#tv27 - in some distance after door 31
462func void spawn_opposite_striker_2(string ai_name)
463{
464ai2_spawn opposite_striker_2
465}
466
467### LOBBY - SECOND FLOOR ###
468
469#tv25 - around the green energy clip; in the room with door 46
470func void spawn_lively_1(string ai_name)
471{
472ai2_spawn lively_striker_1
473}
474
475#tv29 - at the end of the room with door 29; from left to right; includes the hypo
476func void spawn_lively_3(string ai_name)
477{
478ai2_spawn lively_striker_3
479ai2_spawn lively_striker_4
480}
481
482#console 8
483func void passage_3(string ai_name)
484{
485particle lock69c_locklight01 do start
486check_doors
487}
488
489func void check_doors(void)
490{
491var_counter = var_counter + 1
492if(var_counter eq 3)
493        {
494        if(save_point eq 2)
495                {
496                door_unlock 4
497                ai2_spawn Roof_Striker_1
498                ai2_spawn Roof_Striker_2
499                ai2_spawn Roof_Striker_3
500                sound_music_start mus_main03
501                }
502        if(save_point eq 3)
503                {
504                door_unlock 48
505                sound_music_start mus_main03 1.0
506                }
507        var_counter = 0
508        }
509}
510
511#tv20 - in front of door 48
512func void miseenscene_start(string ai_name)
513{
514particle scene create
515ai2_spawn scene_thug_1
516ai2_spawn scene_thug_2
517}
518
519#tv6 - in the middle between door 48 and door 55
520func void spawn_vats(string ai_name)
521{
522ai2_spawn Vat_Striker_1
523ai2_spawn Vat_Striker_2
524ai2_spawn Vat_Striker_3
525ai2_spawn Vat_Striker_4
526ai2_spawn Vat_Striker_5
527}
528
529#console 10 (text console)
530func void day_264(string ai_name)
531{
532ai2_idle scene_thug_1
533ai2_movetoflag scene_thug_1 7010
534ai2_setmovementmode scene_thug_1 run
535sleep 300
536particle day264 create
537particle dayafter create
538particle dayafter do start
539chr_animate scene_thug_1 STRIKEknockdown3
540ai2_dopath scene_thug_1 scene_flee_1
541ai2_dopath scene_thug_2 scene_flee_2
542sleep 300
543ai2_spawn arcy
544sleep 1000
545chr_delete scene_thug_1
546chr_delete scene_thug_2
547sleep 500
548chr_delete arcy
549}
550
551#tv19 - in front of door 55
552func void set_objective_6(string chr_index)
553{
554sound_dialog_play c00_01_22shinatama
555objective_set 6 silent
556target_set 256 30
557}
558
559### HALL ###
560
561#tv16 - the complete acid volume
562func void fallinthevat(string character)
563{
564if(chr_is_player(character) eq 1)
565        {
566        cm_detach
567        chr_animate 0 KONOKOacid
568        sleep 10
569        sound_impulse_play konoko_gruesome_death
570        chr_set_health 0 0
571        }
572else
573        {
574        chr_animate(character, KONOKOacid);
575        sleep 10
576        chr_set_health(character, 0);
577        }
578}
579
580#console 5
581func void unlock_end_door(string ai_name)
582{
583trigvolume_enable final_ambush 1
584particle lockend_locklight02 do start
585door_unlock 56
586target_set 52 30
587ai2_spawn Vat_MB_1
588}
589
590#tv7 - in some distance in front three pillars; from left to right
591func void final_ambush(string ai_name)
592{
593ai2_spawn Ambush_Striker_1
594ai2_spawn Ambush_Striker_2
595}
596
597#hit func of Ambush_Striker_1
598func void gethelp(string ai_name)
599{
600trigvolume_enable outro_volume_1 1
601particle lock177_locklight01 do start
602door_unlock 49
603door_unlock 50
604ai2_attack Ambush_Striker_2 Konoko
605music_stop
606}
607
608#tv14 - after door 50
609#tv15 - after door 49
610func void outro(void)
611{
612fade_out 0 0 0 30
613sleep 30
614win
615}
616
617#####################
618### TEXT CONSOLES ###
619#####################
620
621func void level3a(string chr_index)
622{
623text_console level_3a
624console_reset 7
625}
626
627func void level3b(string chr_index)
628{
629text_console level_3b
630console_reset 6
631}
632
633func void level3c(string chr_index)
634{
635text_console level_3c
636console_reset 1
637}
638
639func void level3d(string chr_index)
640{
641text_console level_3d
642day_264
643}
Note: See TracBrowser for help on using the repository browser.