source: nikanabo/current/bsl/onilight/IGMD/Airport/airport.bsl@ 831

Last change on this file since 831 was 185, checked in by geyser, 17 years ago
File size: 11.0 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) save_point = 1
31if(save_point eq 1) fork intro
32if(save_point eq 2) restore_game
33if(save_point eq 3) restore_game
34sleep 5
35fork sp_all
36}
37
38func void deactivate_stuff(void)
39{
40#not used
41console_deactivate 4
42if(save_point > 1) chr_delete civ_victim_1
43trigvolume_enable bayparticles1 0
44trigvolume_enable bayparticles1_copy 0
45trigvolume_enable exhaust 0
46trigvolume_enable exhaust_copy 0
47trigvolume_enable save_game_2 0
48#used
49console_deactivate 2
50door_lock 3
51particle fx1 do start
52particle fx2 do start
53particle fx3 do start
54particle fx4 do start
55particle fx5 do start
56particle fx6 do start
57particle exhaust create
58particle tarmacfire do start
59trigvolume_enable stop_booth_music_tv 1
60}
61
62func void you_lose(string ai_name)
63{
64fade_out 0 0 0 30
65sleep 30
66lose
67}
68
69####################################
70### SEVERAL TIMES USED FUNCTIONS ###
71####################################
72
73func void sp_all(void)
74{
75co_message_display = 0
76if(save_point eq 1) save_game 1 autosave
77if(save_point eq 2) save_game 2 autosave
78if(save_point eq 3) save_game 3 autosave
79sleep 180
80co_message_display = 1
81}
82
83func void music_stop(void)
84{
85sound_music_stop mus_asian
86sound_music_stop atm_gr06
87sound_music_stop mus_fitec_hd
88}
89
90#tv25 to tv41
91func void fire_damage(string ai_name)
92{
93chr_poison (ai_name, 5, 30, 30);
94}
95
96##########
97### SP1 ###
98##########
99
100func void intro(void)
101{
102particle tctf1 do start
103particle auto1 do start
104particle auto1fire do start
105particle auto1spark do start
106particle door1spark do start
107trigvolume_enable hidden1 1
108trigvolume_enable hidden2 1
109playback 0 IntroKonoko01
110chr_inv_reset 0
111ai2_spawn IntroStriker01
112ai2_spawn IntroStriker02
113objective_set 1 silent
114target_set 1095 30
115sleep 1
116sound_music_start mus_asian 0.8 2.0
117sound_dialog_play_block c00_01_22shinatama
118sound_dialog_play c00_01_28shinatama
119}
120
121#tv 17 and 18 - across the street near the burning car
122func void hidden_civilian1(string ai_name)
123{
124ai2_spawn hidden_civ_1
125}
126
127#hit func of IntroStriker01
128func void hide_1(string char_index)
129{
130ai2_spawn civ_victim_5
131playback_block civ_victim_5 civ_victim5_flee interp 30
132ai2_dopath civ_victim_5 civ_victim_5
133}
134
135#lose func of IntroStriker01
136func void striker_lullaby_1(string ai_name)
137{
138striker_lullaby_2
139}
140
141#lose func of IntroStriker02
142func void striker_lullaby_2(string ai_name)
143{
144var_counter = var_counter + 1
145if(var_counter eq 2)
146 {
147 if(save_point eq 3)
148 {
149 particle door3_locklight01 do start
150 door_unlock 14
151 }
152 music_stop
153 }
154}
155
156#tv 22 - in some distance after the 1st passage
157func void panic1a(string char_index)
158{
159ai2_spawn civ_victim_6
160playback civ_victim_6 civ_victim6_flee interp 30
161ai2_spawn civ_victim_4
162playback civ_victim_4 civ_victim4_flee interp 30
163sleep 30
164ai2_spawn Intro_Striker_4
165playback Intro_Striker_4 striker4_advance interp 30
166ai2_spawn Intro_Comguy_1
167}
168
169#tv10 - after the 2nd passage
170func void panic1b(string char_index)
171{
172ai2_passive Intro_Striker_4 1
173ai2_spawn civ_victim_2
174ai2_spawn civ_victim_3
175playback civ_victim_3 civ_victim3_flee interp 30
176sleep 120
177ai2_spawn Intro_Striker_3
178ai2_attack Intro_Striker_3 civ_victim_2
179ai2_spawn Friend_Thug_1
180ai2_spawn Neutral_Thug_1
181ai2_spawn Neutral_Thug_3
182chr_delete civ_victim_4
183chr_delete civ_victim_6
184}
185
186#tv11 - after the 3rd passage
187func void horror_1(string char_index)
188{
189ai2_passive Intro_Striker_4 0
190ai2_spawn civ_victim_10
191ai2_spawn civ_victim_11
192ai2_spawn civ_victim_20
193ai2_spawn civ_victim_21
194}
195
196#console1
197func void change_terminaldoor_light(void)
198{
199particle door1_locklight01 do start
200door_unlock 3
201music_stop
202}
203
204#tv13 - after door 2
205func void ambush_striker_1(string char_index)
206{
207ai2_spawn Terminal_Striker_1
208ai2_spawn Terminal_Striker_2
209ai2_spawn mad_bomber_1
210obj_create 991 992
211}
212
213#hit func of Terminal_Striker_1
214func void civ_victim_20s_flee(string char_index)
215{
216ai2_dopath civ_victim_20 civ20s_flee1
217ai2_dopath civ_victim_21 civ20s_flee2
218}
219
220#tv14 - in some distance after door 3
221func void mad_bomber_bait(string char_index)
222{
223ai2_dopath mad_bomber_1 bomber_flee 1
224}
225
226func void patrolscript0200(string char_index)
227{
228chr_delete mad_bomber_1
229}
230
231#tv4 - in some distance after tv14
232func void LoadingBay1(string char_index)
233{
234ai2_spawn LoadingBay_Thug_1
235ai2_spawn LoadingBay_Thug_2
236ai2_spawn LoadingBay_Striker_2
237ai2_spawn LoadingBay_Comguy_1
238objective_set 2 silent
239sound_dialog_play c00_01_19shinatama
240}
241
242#tv15 - after tv14 in front of the ramp
243func void bomber_boom(string char_index)
244{
245particle bomb1 do explode
246obj_kill 991 992
247sleep 300
248particle bomb1 stop
249}
250
251#tv8 - the complete floor of the hall
252func void set_target_3(string chr_index)
253{
254particle door1_locklight01 do stop
255door_lock 3
256particle tctf1 do stop
257particle auto1 do stop
258particle auto1fire do stop
259particle auto1spark do stop
260particle door1spark do stop
261chr_delete civ_victim_1
262chr_delete civ_victim_2
263chr_delete civ_victim_3
264chr_delete civ_victim_5
265chr_delete civ_victim_10
266chr_delete civ_victim_11
267chr_delete civ_victim_20
268chr_delete civ_victim_21
269target_set 1109 30
270sound_dialog_play c00_01_26shinatama
271}
272
273##########
274### SP2 ###
275##########
276
277#tv3 - after the passage from the hall to the runway
278func void save_point_2(string player_name)
279{
280if(save_point eq 2)
281 {
282 trigvolume_enable bomberboom 0
283 trigvolume_enable madbomberbait 0
284 trigvolume_enable trigger_volume_03 0
285 target_set 1109 30
286 objective_set 2 silent
287 sleep 1
288 sound_dialog_play_block c00_01_19shinatama
289 sound_dialog_play c00_01_26shinatama
290 }
291else save_game 2 autosave
292ai2_spawn Tarmac_Striker_1
293ai2_spawn Tarmac_Striker_2
294ai2_spawn Tarmac_Striker_3
295ai2_spawn Tarmac_Striker_4
296ai2_spawn Tarmac_Friend_1
297ai2_spawn LoadingBay_Striker_1
298sound_music_start atm_gr06 1
299var_counter = -4
300}
301
302#lose func of Tarmac_Striker_3
303func void progress_check_1(string ai_name)
304{
305progress_check_4
306}
307
308#lose func of Tarmac_Striker_2
309func void progress_check_2(string ai_name)
310{
311progress_check_4
312}
313
314#tv19 - on the left side; over the complete runway from left to right; in front of the nose of the airplane
315func void back9a(string ai_name)
316{
317ai2_spawn hidden_striker1
318}
319
320#tv23 - on the right side; over the complete runway from left to right; under the engines of the airplane
321# (entry func: bay1_particles; exit func: bay2_particles); I've disabled it
322#tv22 - after tv23 (entry func: bay2_particles; exit func: bay1_particles); I've disabled it
323
324#tv20 - in front of the first shack; over the complete runway from left to right
325func void back9b(string ai_name)
326{
327ai2_spawn hidden_striker2
328}
329
330#tv9 - big block; where the to ways down to the hall starts to the windows
331func void set_target_4(string chr_index)
332{
333target_set 1112 30
334sound_dialog_play c00_01_25shinatama
335}
336
337#tv6 - in front of the passage to the hall
338func void BayTwo1(string char_index)
339{
340ai2_dopath Tarmac_Striker_2 come_to_me 1
341ai2_dopath Tarmac_Striker_3 come_to_me 1
342ai2_dopath mad_bomber_2 come_to_me 1
343ai2_spawn BayTwo_Striker_1
344ai2_spawn hidden_friend2
345ai2_spawn mad_bomber_2
346music_stop
347}
348
349#lose func of mad_bomber_2
350func void progress_check_3(string ai_name)
351{
352progress_check_4
353}
354
355#lose func of BayTwo_Striker_1
356func void progress_check_4(string ai_name)
357{
358var_counter = var_counter + 1
359}
360
361#tv42 - after tv6 (entry func: exhaust_off; exit func: exhaust_on); I've disabled it
362#tv43 - after tv42 (entry func: exhaust_on; exit func: exhaust_off); I've disabled it
363#tv16 - at the end of the ramp; in front of door 6 (entry func: set_target_5; inside func: save_point_3); I've disabled it
364
365##########
366### SP3 ###
367##########
368
369#tv44 - at the same place as tv16
370func void second_coming(string ai_name)
371{
372if(var_counter eq 0)
373 {
374 if(save_point eq 3)
375 {
376 trigvolume_enable back9 0
377 trigvolume_enable back9_copy 0
378 trigvolume_enable bomberboom 0
379 trigvolume_enable madbomberbait 0
380 trigvolume_enable tarmac 0
381 trigvolume_enable trigger_volume_03 0
382 trigvolume_enable trigger_volume_08 0
383 trigvolume_enable trigger_volume_10 0
384 trigvolume_enable trigger_volume_11 0
385 objective_set 2 silent
386 }
387 else save_game 3 autosave
388 trigvolume_enable secondcoming 0
389 ai2_spawn TerminalTwo_Striker_1
390 ai2_spawn TerminalTwo_Striker_2
391 door_unlock 6
392 particle door7_locklight01 do start
393 particle lock2_locklight01 do start
394 target_set 1115 30
395 sleep 1
396 sound_dialog_play c00_01_24shinatama
397 }
398else
399 {
400 ai2_dopath Tarmac_Striker_2 come_to_me 1
401 ai2_dopath Tarmac_Striker_3 come_to_me 1
402 ai2_dopath mad_bomber_2 come_to_me 1
403 }
404}
405
406func void patrolscript000(string ai_name)
407{
408particle lock2_locklight01 do start
409door_unlock 6
410}
411
412#tv1 - after door 7
413func void Booth(string wazzzup)
414{
415ai2_spawn BoothStriker01
416ai2_spawn BoothStriker02
417playback BoothStriker01 BoothStriker01
418playback BoothStriker02 BoothStriker02
419sound_music_start mus_asian 0.8
420target_set 0 0
421door_lock 10
422}
423
424#lose func of BoothStriker01
425func void console_2_activate(string char_index)
426{
427console_activate 2
428}
429
430#console 2
431func void change_door2_light(void)
432{
433door_lock 7
434particle door7_locklight01 do stop
435particle door2_locklight01 do start
436console_deactivate 2
437objective_set 3 silent
438target_set 1139 30
439sound_dialog_play_block c00_01_18shinatama
440sound_dialog_play c00_01_28shinatama
441}
442
443#tv5 - after door 10
444func void Repair1(string char_index)
445{
446ai2_spawn Repair_Striker_1
447ai2_spawn Repair_Comguy_1
448ai2_spawn alamo_thug_1
449}
450
451#tv24 - after door 11
452func void stop_booth_music(string who)
453{
454music_stop
455}
456
457#tv21 - at the beginning of the stairs to door 13
458func void Repair2(string char_index)
459{
460ai2_spawn Repair_Striker_2
461ai2_spawn Repair_Comguy_2
462}
463
464#console 3
465func void final_ambush(string char_index)
466{
467sound_music_start mus_fitec_hd 0.91
468particle door3_locklight01 do start
469door_unlock 14
470ai2_spawn finalam_striker_1
471ai2_spawn finalam_striker_2
472ai2_setmovementmode finalam_striker_1 walk
473ai2_setmovementmode finalam_striker_2 walk
474playback finalam_striker_1 finalam_striker1
475playback finalam_striker_2 finalam_striker2
476sleep 240
477particle door3_locklight01 do stop
478door_lock 14
479ai2_dopath finalam_striker1 finalam_1 1
480ai2_dopath finalam_striker2 finalam_2 1
481}
482
483#for the open door func see func: striker_lullaby_2
484#tv12 - on the stairs to door 12 (entry func: i_uh_heheheh); it's disabled and I didn't enabled it
485
486#tv7 - after door 14
487func outro(string wazzup)
488{
489fade_out 0 0 0 30
490sleep 30
491win
492}
493
494#####################
495### TEXT CONSOLES ###
496#####################
497
498func void level_4a(void)
499{
500text_console level_4a
501console_reset 7
502}
503
504func void level_4b(void)
505{
506text_console level_4b
507console_reset 7
508}
509
510func void level_4c(void)
511{
512text_console level_4c
513console_reset 8
514}
Note: See TracBrowser for help on using the repository browser.