source: nikanabo/current/bsl/onilight/IGMD/EnvWarehouse/warehouse.bsl@ 828

Last change on this file since 828 was 185, checked in by geyser, 17 years ago
File size: 12.2 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 = .15
14gl_fog_blue = .15
15gl_fog_green = .15
16gl_fog_start = .995
17gs_farclipplane_set 5000
18ui_suppress_prompt = 1
19chr_auto_aim_dist = 0
20if(save_point > 0) start
21}
22
23#############
24### START ###
25#############
26
27func void start(string ai_name)
28{
29fork deactivate_stuff
30splash_screen warehouse_splash_screen
31if(save_point eq 1) save_point = 2
32if(save_point eq 2) fork intro
33if(save_point eq 3) restore_game
34if(save_point eq 4) restore_game
35if(save_point eq 5) restore_game
36sleep 5
37fork sp_all
38}
39
40func void deactivate_stuff(void)
41{
42#not used
43trigvolume_enable tv_train_movement 0
44console_deactivate 4
45trigvolume_enable alarm_trigvol 0
46trigvolume_enable mid_warehouse_target 0
47trigvolume_enable setup_bay3_tv 0
48trigvolume_enable trigger_volume_01 0
49trigvolume_enable trigger_volume_06 0
50trigvolume_enable trigger_volume_63 0
51trigvolume_enable trigger_volume_64 0
52trigvolume_enable trigger_volume_65 0
53trigvolume_enable trigger_volume_68 0
54trigvolume_enable trigger_volume_70 0
55trigvolume_enable trigger_volume_76 0
56trigvolume_enable trigger_volume_77 0
57trigvolume_enable trigger_volume_80 0
58trigvolume_enable tv_66 0
59#used
60door_unlock 108
61env_show 2010 0
62obj_create 20 20
63trigvolume_enable gotLSI_tv 0
64}
65
66func void you_lose(string ai_name)
67{
68fade_out 0 0 0 30
69sleep 30
70lose
71}
72
73####################################
74### SEVERAL TIMES USED FUNCTIONS ###
75####################################
76
77func void sp_all(void)
78{
79co_message_display = 0
80if(save_point eq 2) save_game 2 autosave
81if(save_point eq 3) save_game 3 autosave
82if(save_point eq 4) save_game 4 autosave
83if(save_point eq 5) save_game 5 autosave
84sleep 180
85co_message_display = 1
86}
87
88func void remove_ai(void)
89{
90ai2_kill
91sleep 60
92powerup_reset
93weapon_reset
94sleep 240
95corpse_reset
96}
97
98func void music_stop(void)
99{
100#training
101sound_music_stop atm_gr06
102sound_music_stop atm_ft68
103#warehoue
104sound_music_volume mus_ambgrv1 0.0 2.0
105sound_music_stop mus_ambgrv1
106sound_music_stop atm_low1
107sound_music_volume mus_chase 0.0 3.0
108sound_music_stop mus_chase
109}
110
111##########
112### SP1 ###
113##########
114
115func void intro(void)
116{
117playback 0 SwingKonokoSet
118chr_inv_reset 0
119ai2_spawn A_t48
120objective_set 1 silent
121}
122
123#tv55 - the complete area of the platform where Konoko starts (no funcs); I've disabled it
124#lose func of A_t48 (func: t48_dead); I don't use it
125
126#console 1
127func void unlock6(string ai_name)
128{
129particle d1_locklight01 do start
130door_unlock 6
131target_set 44 30
132ai2_spawn A_t50
133trigvolume_enable trigger_volume_65 1
134}
135
136#tv57 - in front of door 6 (entry func: t65; exit func: t65b); I've diabled it
137
138### FIRST HALL - GROUND FLOOR ###
139
140#tv56 - after door 6 (entry func: t64); I've diabled it
141#tv72 - right side; in the right corner (entry func: t77); I've diabled it
142
143#tv12 - left side; after the box near the left wall
144func void rat3(void)
145{
146particle rat3 pulse
147}
148
149#tv11 - in front of door 16; right side; around the small drum
150func void bug0(void)
151{
152particle bug0 pulse
153}
154
155### FIRST HALL - FIRST FLOOR ###
156
157#console 2
158func void unlock1(string ai_name)
159{
160particle lock1_locklight01 do start
161door_unlock 15
162door_unlock 16
163target_set 33 15
164sleep 120
165ai2_spawn Bay1_Thug_1
166}
167
168### FIRST HALL - SECOND FLOOR ###
169
170#tv74 - on the top of the crane cabin
171func void t02(string ai_name)
172{
173ai2_spawn secret2
174ai2_dopath A_t50 patrol_secret1
175ai2_setjobstate A_t50
176fork health_check
177}
178
179func void health_check(void)
180{
181chr_wait_health secret2 0
182train_fathealth
183}
184
185#tv58 - in front of door 4 (entry func: t01); I've disabled it
186
187### SECOND HALL - GROUND FLOOR ###
188
189#tv80 - the complete volume of the hall (no funcs); I've disabled it
190
191#tv1 - high box after door 16 and door 15
192func void intro_enemies(string ai_name)
193{
194ai2_spawn Bay2_Thug_1
195ai2_spawn Bay2_Thug_2
196sound_music_start mus_ambgrv1 0
197sound_music_volume mus_ambgrv1 0.75 3.0
198}
199
200#lose func of Bay2_Thug_1
201func void train_fathealth(string ai_name)
202{
203if(var_counter eq 0)
204 {
205 var_counter = 1
206 sleep 90
207 sound_dialog_play c00_01_93shinatama
208 sound_dialog_play_block pause
209 sleep 40
210 sound_dialog_play c00_01_94shinatama
211 }
212}
213
214#tv19 - after one third of the hall; from left to right; ends right in some distance in front of door 18
215func void rat1(void)
216{
217particle rat1 pulse
218}
219
220#tv13 - after door 18
221func void bug8(void)
222{
223particle bug8 pulse
224}
225
226#console 3
227func void unlock2(string ai_name)
228{
229particle lock2_locklight01 do start
230door_unlock 24
231door_unlock 26
232target_set 84 15
233music_stop
234}
235
236#tv4 - in front of door 26 and door 24 (entry func: setup_bay3); I've disabled it
237
238### SECOND HALL - FIRST FLOOR ###
239
240#nothing here; no second floor
241
242### THIRD HALL - GROUND FLOOR ###
243
244#tv15 - after door 26; right side; in front of the first box
245func void rat6(void)
246{
247particle rat6 pulse
248}
249
250#tv14 - next to tv15; in front of the second box
251func void bug4(void)
252{
253particle bug4 pulse
254}
255
256#tv16 - in some distance after door 31
257func void rat4(void)
258{
259particle rat4 pulse
260}
261
262### THIRD HALL - FIRST FLOOR ###
263
264#tv5 - around Chung
265func void Chung(void)
266{
267sound_music_start atm_low1 0.7
268trigvolume_enable gotLSI_tv 1
269target_set 1 0
270}
271
272#tv30 - around the lsi
273func void checkLSI(string ai_name)
274{
275trigvolume_enable gotLSI_tv 0
276if(chr_has_lsi(0) eq 1)
277 {
278 particle lock3_locklight01 do start
279 door_unlock 37
280 music_stop
281 ai2_spawn Ambush_Striker_1
282 ai2_spawn Mid_Thug_1
283 ai2_spawn Mid_Thug_2
284 objective_set 2 silent
285 target_set 7053 30
286 var_counter = 0
287 }
288if(chr_has_lsi(0) eq 0)
289 {
290 sleep 60
291 trigvolume_enable gotLSI_tv 1
292 }
293}
294
295### THIRD HALL - SECOND FLOOR ###
296
297#tv75 - in front of door 32
298func void t05(string ai_name)
299{
300ai2_spawn ambush_striker
301}
302
303##########
304### SP2 ###
305##########
306
307#tv59 - after door 37
308func void s2(string player_name)
309{
310if(save_point eq 3)
311 {
312 ai2_spawn Mid_Thug_1
313 ai2_spawn Mid_Thug_2
314 objective_set 2 silent
315 target_set 7053 30
316 }
317else save_game 3 autosave
318}
319
320#tv76 - in front of door 36
321func void t09(string ai_name)
322{
323target_set 62 30
324}
325
326#tv63 - after door 35
327func void t07(string ai_name)
328{
329ai2_spawn Top_Thug_5
330}
331
332#tv64 - after door 34; near the end of the way; near the corner of the left wall
333func void t69(string ai_name)
334{
335ai2_spawn Top_Striker_1
336ai2_spawn Top_Comguy_1
337ai2_spawn Top_Thug_3
338}
339
340#tv6 - in front of door 61
341func void spawn_mid2(string ai_name)
342{
343ai2_spawn Mid2_Striker_1
344ai2_spawn Mid2_Striker_2
345target_set 66 15
346}
347
348#console 5
349func void unlock4(string ai_name)
350{
351particle lock4_locklight01 do start
352door_unlock 65
353target_set 7054 15
354}
355
356##########
357### SP3 ###
358##########
359
360#tv62 - after door 65 (entry func: s3); I've disabled it
361
362#tv2 - after door 65; nearly at the same position as tv62
363func void train_alarm(string ai_name)
364{
365if(save_point eq 4)
366 {
367 objective_set 2 silent
368 target_set 7054 15
369 }
370else
371 {
372 fork remove_ai
373 save_game 4 autosave
374 door_lock 60
375 }
376ai2_spawn Bay4_Comguy_1
377}
378
379### FIRST HALL - GROUND FLOOR ###
380
381#tv18 - in front of door 68
382func void rat5(void)
383{
384particle rat5 pulse
385}
386
387#console 7 ==> see second floor
388
389### FIRST HALL - FIRST FLOOR ###
390
391#hit func of Bay4_Comguy_1
392func void hurt1(string ai_name)
393{
394ai2_makeignoreplayer Bay4_Comguy_1 1
395ai2_doalarm Bay4_Comguy_1 6
396ai2_dopath Bay4_Comguy_1 Run_To_Alarm
397ai2_setjobstate Bay4_Comguy_1
398sleep 60
399sound_dialog_play c00_01_96shinatama
400}
401
402func void patrolscript0001(string ai_name)
403{
404ai2_doalarm Bay4_Comguy_1 6
405}
406
407### FIRST HALL - SECOND FLOOR ###
408
409#console 7
410func void unlock5(string ai_name)
411{
412particle lock4_locklight01 do stop
413door_lock 65
414particle lock5_locklight01 do start
415door_unlock 73
416door_unlock 74
417door_unlock 81
418door_unlock 82
419target_set 72 30
420console_deactivate 7
421var_counter = 1
422}
423
424#tv7 - in front of console 6 (entry func: alarm_warning; exit func: alarm_warningb); I've disabled it
425
426#console 6
427func void alarm_trig(string ai_name)
428{
429fork do_alarm_sound
430if(var_counter eq 0) unlock5
431ai2_makeignoreplayer Bay4_Comguy_1 0
432ai2_dopath Bay4_Comguy_1 patrol_42
433ai2_setjobstate Bay4_Comguy_1
434ai2_spawn Alarm_Bay4_Striker_1
435chr_teleport Alarm_Bay4_Striker_1 7033
436ai2_attack Alarm_Bay4_Striker_1 char_0
437ai2_spawn Alarm_Bay4_Striker_2
438chr_teleport Alarm_Bay4_Striker_2 7033
439ai2_attack Alarm_Bay4_Striker_2 char_0
440}
441
442func void do_alarm_sound(void)
443{
444sound_ambient_start alarm_loop
445sleep 900
446sound_ambient_stop alarm_loop
447}
448
449#console 4 (func: unlock_alarm); I've disabled it
450
451### SECOND HALL - GROUND FLOOR ###
452
453#tv31 - high box after door 73 and door 74
454func void t47(string ai_name)
455{
456ai2_spawn Bay5_Thug_1
457ai2_spawn Bay5_Thug_2
458}
459
460### SECOND HALL - FIRST FLOOR ###
461
462#nothing, no second floor
463
464### THIRD HALL - GROUND FLOOR ###
465
466#tv32 - after door 81
467func void spawn_bay6_bot(string ai_name)
468{
469trigvolume_enable spawn_bay6_top_tv 0
470ai2_spawn Bay6_Striker_1b
471ai2_spawn Bay6_Neutral_1b
472ai2_spawn Bay6_Neutral_2
473ai2_spawn guard1
474train_neutral
475}
476
477func void train_neutral(string ai_name)
478{
479target_set 92 15
480sound_dialog_play c00_01_97shinatama
481}
482
483### THIRD HALL - FIRST FLOOR ###
484
485#tv60 - complete volume of the first floor (no funcs); I've disabled it
486
487#tv3 - after door 82
488func void spawn_bay6_top(string ai_name)
489{
490trigvolume_enable spawn_bay6_bot_tv 0
491ai2_spawn Bay6_Striker_1
492ai2_spawn Bay6_Neutral_1
493ai2_spawn Bay6_Neutral_2
494ai2_spawn guard1
495train_neutral
496}
497
498#tv79 - after door 87
499func void t10(string ai_name)
500{
501ai2_makeignoreplayer Bay6_Neutral_1 1
502ai2_makeignoreplayer Bay6_Neutral_1b 1
503ai2_dopath Bay6_Neutral_1 Bay6_Thug_1
504ai2_dopath Bay6_Neutral_1b Bay6_Thug_1_copy
505sleep 240
506ai2_makeignoreplayer Bay6_Neutral_1 0
507ai2_makeignoreplayer Bay6_Neutral_1b 0
508}
509
510### THIRD HALL - SECOND FLOOR ###
511
512#tv61 - after door 88
513func void t67(string ai_name)
514{
515chr_changeteam guard1 Syndicate
516}
517
518#neutral func of Bay6_Neutral_2
519func void gotoconsole(string ai_name)
520{
521console_activate 9
522sleep 7
523ai2_doalarm Bay6_Neutral_2 9
524sleep 180
525trigvolume_enable trigger_volume_06 1
526}
527
528#tv77 - around console 9 (exit func: t06); I've disabled it
529
530#console 9
531func void open_warehouse(string ai_name)
532{
533if(save_point eq 4)
534 {
535 particle lock7_locklight01 do start
536 door_unlock 86
537 ai2_spawn Final_Thug_1
538 ai2_spawn Final_Thug_2
539 ai2_spawn Final_Thug_3
540 ai2_spawn Final_Thug_5
541 ai2_dopath Bay6_Neutral_2 Open_Warehouse
542 ai2_setjobstate Bay6_Neutral_2
543 objective_set 3 silent
544 target_set 93 15
545 }
546particle bigdoor_locklight02 do start
547ai2_spawn WH_Thug_A
548ai2_dopath WH_Thug_A WH_Thug_A
549ai2_setjobstate WH_Thug_A
550ai2_spawn WH_Striker_B
551ai2_dopath WH_Striker_B WH_Striker_B
552ai2_setjobstate WH_Striker_B
553ai2_spawn WH_Striker_C
554ai2_spawn WH_Striker_D
555ai2_dopath WH_Striker_D WH_Striker_D
556ai2_setjobstate WH_Striker_D
557}
558
559#tv8 - in front of door 48 (entry func: train_timer); I've diabled it
560
561##########
562### SP4 ###
563##########
564
565#tv73 - after door 48
566func void s4(string ai_name)
567{
568if(save_point eq 5) open_warehouse
569else save_game 5 autosave
570objective_set 4 silent
571target_set 96 15
572sleep 1
573timer_start 180 you_lose
574sound_music_start mus_chase 0
575sound_music_volume mus_chase 0.50 1.0
576sound_dialog_play c00_01_95shinatama
577sound_dialog_play_block pause
578sound_music_volume mus_chase 0.75 1.0
579}
580
581#tv17 - after door 48; right next to the box at 10 past 12
582func void rat2(void)
583{
584particle rat2 pulse
585}
586
587#tv9 - after door 56
588func void stair1_target(string ai_name)
589{
590target_set 31 15
591}
592
593#tv10 - in front of door 58
594func void stair2_target(string ai_name)
595{
596target_set 81 15
597}
598
599#tv71 - big box around console 8 (no funcs); I've disabld it
600#tv65 - not so big box around console 8 (inside func: t70); I've disabld it
601
602#lose func of WH_Striker_C
603func void end_striker(string ai_name)
604{
605music_stop
606}
607
608#console 8
609func void end_console(string ai_name)
610{
611timer_stop
612fade_out 0 0 0 30
613sleep 30
614win
615}
616
617#####################
618### TEXT CONSOLES ###
619#####################
620
621func void console_evidence1(string ai_name)
622{
623text_console level_1a
624console_reset 19
625}
626
627func void console_evidence2(string ai_name)
628{
629text_console level_1b
630console_reset 20
631}
Note: See TracBrowser for help on using the repository browser.