source: nikanabo/current/bsl/onilight/IGMD/manplant/manplant.bsl@ 294

Last change on this file since 294 was 185, checked in by geyser, 18 years ago
File size: 10.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 = .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
20start
21}
22
23#############
24### START ###
25#############
26
27func void start(void)
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
34if(save_point eq 4) restore_game
35sleep 5
36fork sp_all
37}
38
39func void deactivate_stuff(void)
40{
41trigvolume_setscript save_point4 sp4 entry
42#not used
43trigvolume_enable alarm_1 0
44trigvolume_enable brain_commguy_1 0
45trigvolume_enable febtober2 0
46trigvolume_enable flyway_1 0
47trigvolume_enable Griffin 0
48trigvolume_enable hidden_1a 0
49trigvolume_enable hidden_1b 0
50trigvolume_enable lowthug_1 0
51trigvolume_enable new_target_3 0
52trigvolume_enable nook_1 0
53trigvolume_enable nookright 0
54trigvolume_enable outro1 0
55trigvolume_enable plasma_striker_1 0
56trigvolume_enable sound_off 0
57trigvolume_enable trigger_active_1 0
58trig_deactivate 201
59trig_deactivate 202
60trig_deactivate 203
61trig_deactivate 204
62trig_deactivate 2012
63trig_deactivate 2022
64particle lock_1_locklight01 do start
65particle lock_1b_locklight01 do start
66env_show 555 0
67door_lock 1
68#used
69trigvolume_enable febtober 0
70trigvolume_enable tech_1 0
71trig_hide 205
72trig_hide 2013
73trig_hide 2023
74trig_hide 2032
75trig_hide 2042
76obj_create 1201 1208
77env_anim 1201 1208
78door_unlock 3
79door_lock 4
80door_lock 9
81door_lock 21
82console_deactivate 6
83}
84
85func void you_lose(void)
86{
87fade_out 0 0 0 30
88sleep 30
89lose
90}
91
92####################################
93### SEVERAL TIMES USED FUNCTIONS ###
94####################################
95
96func void sp_all(void)
97{
98co_message_display = 0
99if(save_point eq 1) save_game 1 autosave
100if(save_point eq 2) save_game 2 autosave
101if(save_point eq 3) save_game 3 autosave
102if(save_point eq 4) save_game 4 autosave
103sleep 180
104co_message_display = 1
105}
106
107func void remove_ai(void)
108{
109ai2_kill
110sleep 60
111powerup_reset
112weapon_reset
113sleep 240
114corpse_reset
115}
116
117func void music_stop(void)
118{
119sound_music_stop mus_fiteb_hd
120sound_music_stop atm_low_perc1
121sound_music_stop atm_cl12
122}
123
124##########
125### SP1 ###
126##########
127
128func void intro(void)
129{
130chr_inv_reset 0
131ai2_spawn nookleft_thug_1
132ai2_spawn nookright_thug_1
133ai2_spawn ambush_striker_1
134ai2_spawn ambush_striker_2
135ai2_spawn ambush_striker_3
136ai2_spawn partner_cop_1
137ai2_spawn partner_cop_2
138ai2_attack partner_cop_1 ambush_striker_1
139ai2_attack partner_cop_2 ambush_striker_3
140ai2_makeaware nookleft_thug_1 konoko
141ai2_makeaware nookright_thug_1 konoko
142objective_set 1 silent
143target_set 38 30
144sleep 1
145sound_music_start mus_fiteb_hd 0.75
146sound_dialog_play c00_01_22shinatama
147}
148
149#tv3 - after door 3 (entry func: nookright); I've disabled it
150#tv1 - between door 2 and door 4 (entry func: nook_1); I've disabled it
151
152#lose func of ambush_striker_1
153func void striker_lullaby_1(void)
154{
155striker_lullaby_3
156}
157
158#lose func of ambush_striker_2
159func void striker_lullaby_2(void)
160{
161striker_lullaby_3
162}
163
164#lose func of ambush_striker_3
165func void striker_lullaby_3(void)
166{
167var_counter = var_counter + 1
168if(var_counter eq 3)
169 {
170 particle foyer_right_locklight01 do start
171 door_unlock 21
172 trigvolume_enable tech_1 1
173 var_counter = 0
174 music_stop
175 }
176}
177
178#tv2 - in front of door 21
179func void tech_1(void)
180{
181ai2_spawn tech_thug_1
182ai2_spawn tech_thug_1a
183ai2_dopath partner_cop_1 cop_backup_1a 1
184ai2_dopath partner_cop_2 cop_backup_1b 1
185}
186
187#tv28 - after door 21 (func: all_music_counters); I've disabled it
188#tv25 - complete room (func: feb_tober2); I've disabled it
189
190#console1
191func void door_1(void)
192{
193door_lock 8
194door_lock 15
195ai2_spawn plasma_striker_1
196particle febtober1_locklight01 do start
197particle lock_1a_locklight01 do start
198particle save1a_locklight01 do start
199door_unlock 19
200target_set 123 30
201}
202
203#tv5 - after door 19
204func void bait_1(void)
205{
206ai2_spawn bait_commguy_1
207ai2_spawn tech_thug_2
208sleep 120
209ai2_doalarm bait_commguy_1 15
210sound_music_start atm_low_perc1 1.00
211particle save1b_locklight01 do start
212door_unlock 11
213ai2_dopath partner_cop_1 cop_backup_2a 1
214ai2_dopath partner_cop_2 cop_backup_2b 1
215}
216
217#tv13 - after door 13 (enter func: plasma_striker_1, loop func: calling_all_cars); I've disabled it
218#tv6 - after door 12 (func: calling_all_cars2); I've disabled it
219
220#console15
221func void alarm_1(void)
222{
223ai2_spawn hall_striker_2
224sound_ambient_start alarm_loop
225sleep 900
226sound_ambient_stop alarm_loop
227}
228
229##########
230### SP2 ###
231##########
232
233#tv18 - after door 11
234func void tech_ambush_1(void)
235{
236if(save_point eq 2)
237 {
238 door_lock 8
239 door_lock 15
240 ai2_spawn plasma_striker_1
241 particle save1b_locklight01 do start
242 door_unlock 11
243 objective_set 1 silent
244 target_set 38 30
245 sleep 1
246 sound_music_start atm_low_perc1 1.00
247 sound_dialog_play c00_01_22shinatama
248 }
249else save_game 2 autosave
250ai2_spawn hall_striker_1
251door_lock 10
252door_lock 12
253}
254
255#console3
256func void door_2(void)
257{
258particle febtober1_locklight01 do start
259particle lock88_locklight02 do start
260door_unlock 10
261door_unlock 23
262ai2_spawn patrol_striker_2
263console_activate 4 1
264target_set 124 30
265sound_dialog_play c00_01_27shinatama
266}
267
268#tv7 - in front of door 7
269func void cruel_1(void)
270{
271ai2_spawn cruel_commguy_1
272ai2_spawn victim_femsci_1
273}
274
275#console4
276func void door_3(void)
277{
278music_stop
279particle lock_3_locklight01 do start
280door_unlock 4
281ai2_spawn tech_thug_3
282objective_set 2 silent
283target_set 128 30
284sound_dialog_play c00_01_26shinatama
285}
286
287#tv4 - in some distance in front of door 23 (func: flyway_1); I've disabled it
288
289#tv19 - after door 23
290func void new_target_1(void)
291{
292sound_music_start atm_cl12 0.75
293target_set 54 30
294}
295
296#tv15 - at the beginning of the stairs after door 24
297func void beaters_1(void)
298{
299chr_delete plasma_striker_1
300door_unlock 8
301door_unlock 15
302ai2_spawn scram_striker_1
303ai2_spawn beater_thug_1
304particle vent01 start
305}
306
307#lose func of beater_thug_1
308func void beater_thug_2(void)
309{
310ai2_spawn beater_thug_2
311}
312
313#lose func of scram_striker_1
314func void backup_2(void)
315{
316ai2_spawn backup_thug_2
317ai2_tripalarm 2 0
318}
319
320#tv16 - in front of door 16 (enter func: scramble_sound_off, loop func: Griffin_1); I've disabled it
321#tv10 - after door 16 (enter func: set_objective_3, inside func: lowthug_1, leave func: disable_obj_trig_1); I've disabled it
322
323##########
324### SP3 ###
325##########
326
327#tv26 - in some distance in front of door 15
328func void save_point_3(void)
329{
330if(save_point ne 3)
331 {
332 fork remove_ai
333 save_game 3 autosave
334 particle vent01 do stop
335 music_stop
336 }
337particle hlock_1_locklight01 do start
338door_unlock 22
339particle vent02 do start
340trig_activate 2
341door_close 16
342door_lock 16
343trigvolume_enable febtober 1
344ai2_spawn hidden_sci_1
345ai2_spawn low_thug_1
346ai2_spawn low_thug_2
347objective_set 3 silent
348target_set 127 30
349sleep 1
350sound_dialog_play c00_01_18shinatama
351}
352
353#tv8 - in front of door 22 (func: hidden_1b); I've disabled it
354#tv9 - after door 22
355
356#console7
357func void guardroom_1(void)
358{
359particle guardroom_1_locklight01 do start
360door_unlock 14
361ai2_spawn patrol_striker_3
362ai2_spawn brain_commguy_1
363ai2_spawn brain_commguy_2
364console_deactivate 6
365target_set 65 30
366}
367
368#tv13 - at the beginning of the upper way, next to where the stairs ends (func: trigger_active_1); I've disabled it
369
370#tv24 - after the railing
371func void feb_tober(string ai_name)
372{
373fade_out 0 0 0 30
374sleep 30
375chr_teleport 0 41
376chr_facetoflag 0 126
377fade_in 30
378trigvolume_reset febtober
379}
380
381#tv11 - after door 14 (func: brain_commguy_1); I've disabled it
382
383#console8
384func void brainlock_1(void)
385{
386ai2_spawn low_striker_1
387ai2_spawn low_striker_2
388console_activate 6
389target_set 126 30
390}
391
392#tv12 - after door 8
393func void low_striker_1(string ai_name)
394{
395ai2_spawn low_striker_1
396ai2_spawn low_striker_2
397}
398
399#tv20 - in front of the furniture with console6 (func: new_target_3); I've disabled it
400
401#console6
402func void trigger_deactivate_4(void)
403{
404particle guardroom_2_locklight01 do start
405door_unlock 9
406trig_deactivate 4
407console_activate 5
408target_set 125 30
409}
410
411#console5
412func void hidden_1(void)
413{
414particle brainlock_1_locklight02 do start
415door_unlock 6
416target_set 129 30
417trigvolume_enable cruel_striker_1 1
418}
419
420#tv21 - in front of door 6
421func void cruel_striker_1(void)
422{
423ai2_spawn cruel_striker_1
424ai2_spawn victim_mansci_1
425brain_start
426}
427
428func void brain_start(void)
429{
430particle brainlock_2_locklight01 do start
431particle brain do start
432particle brain1 do start
433trig_show 205
434trig_show 2013
435trig_show 2023
436trig_show 2032
437trig_show 2042
438trig_speed 205 .4
439trig_speed 2013 .4
440trig_speed 2023 .4
441trig_speed 2032 .4
442trig_speed 2042 .4
443}
444
445#called up, after you have talked to the scientist
446func void flee(void)
447{
448chr_talk victim_mansci_1 c02_62_11sci 0 0
449ai2_dopath victim_mansci_1 victim_2
450sleep 300
451objective_set 4 silent
452sound_dialog_play c00_01_20shinatama
453}
454
455#tv17 - in front of the beginning of the stairs (func: outro); not used
456
457##########
458### SP4 ###
459##########
460
461#tv27 - after door 26
462func void sp4(void)
463{
464if(save_point eq 4)
465 {
466 brain_start
467 objective_set 4 silent
468 sleep 1
469 sound_dialog_play c00_01_20shinatama
470 }
471else
472 {
473 save_game 4 autosave
474 fork remove_ai
475 particle brainlock_1_locklight02 do stop
476 door_lock 6
477 particle vent02 stop
478 }
479turret_deactivate 20
480particle brainlock_3_locklight01 do start
481door_unlock 27
482sound_ambient_start deadlybrain_sound 1.0
483sound_music_start mus_cool4_hd 1
484}
485
486#tv22 - in some distance after door 27
487#tv23 - in some distance after door 27 on the right side
488func void lockit(void)
489{
490particle brainlock_3_locklight01 do stop
491door_close 27
492door_jam 27
493}
494
495#console21, console22, console23 and console24
496func void brain_counter(void)
497{
498var_counter = var_counter + 1
499if(var_counter eq 4)
500 {
501 fade_out 0 0 0 30
502 sleep 30
503 win
504 }
505}
506
507#####################
508### TEXT CONSOLES ###
509#####################
510
511func void level2a(string chr_index)
512{
513text_console level_2a
514console_reset 2
515}
516
517func void level2b(string chr_index)
518{
519text_console level_2b
520console_reset 12
521}
522
523func void level2c(string chr_index)
524{
525text_console level_2c
526console_reset 13
527}
528
529func void level2d(string chr_index)
530{
531text_console level_2d
532console_reset 14
533}
534
535func void level2e(string chr_index)
536{
537text_console level_2e
538console_reset 11
539}
Note: See TracBrowser for help on using the repository browser.