ViewVC Help
View File | Revision Log | View Changeset | Root Listing
root/Oni2/nikanabo/current/bsl/onilight/IGMD/dream_lab/dream_lab.bsl
Revision: 185
Committed: Mon May 21 18:48:22 2007 UTC (18 years, 4 months ago) by geyser
File size: 10461 byte(s)
Log Message:

File Contents

# Content
1 #################
2 ### VARIABLES ###
3 #################
4
5 var int var_counter = 0;
6 var int var_counter2 = 0;
7
8 ############
9 ### MAIN ###
10 ############
11
12 func void main(void)
13 {
14 gl_fog_red = 0
15 gl_fog_blue = 0
16 gl_fog_green = 0
17 gl_fog_start = .995
18 gs_farclipplane_set 5000
19 ui_suppress_prompt = 1
20 chr_auto_aim_dist = 0
21 start
22 }
23
24 #############
25 ### START ###
26 #############
27
28 func void start(string ai_name)
29 {
30 fork deactivate_stuff
31 if(save_point eq 0) save_point = 1
32 if(save_point eq 1) fork intro
33 if(save_point eq 2) restore_game
34 sleep 5
35 fork sp_all
36 }
37
38 func void deactivate_stuff(void)
39 {
40 #not used
41 trigvolume_enable ambush1a_copy 0
42 #used
43 trigvolume_enable splash_trigger 0
44 env_show 1976 0
45 door_lock 1
46 door_lock 3
47 }
48
49 func void you_lose(string ai_name)
50 {
51 fade_out 0 0 0 30
52 sleep 30
53 lose
54 }
55
56 ####################################
57 ### SEVERAL TIMES USED FUNCTIONS ###
58 ####################################
59
60 func void sp_all(void)
61 {
62 co_message_display = 0
63 if(save_point eq 1) save_game 1 autosave
64 if(save_point eq 2) save_game 2 autosave
65 sleep 180
66 co_message_display = 1
67 }
68
69 func void remove_ai(void)
70 {
71 ai2_kill
72 sleep 60
73 powerup_reset
74 weapon_reset
75 sleep 240
76 corpse_reset
77 }
78
79 func void music_stop(void)
80 {
81 sound_music_volume mus_om01 0.0 1.0
82 sound_music_stop mus_om01
83 sound_music_stop atm_gr09
84 sound_music_stop mus_wls
85 sound_music_stop atm_ft81
86 }
87
88 ##########
89 ### SP1 ###
90 ##########
91
92 func void intro(void)
93 {
94 env_show 200 0
95 env_show 201 0
96 env_show 227 0
97 env_show 231 1
98 env_show 232 1
99 env_show 999 0
100 ai2_spawn IntroMuro
101 playback IntroMuro IntroMuroSet
102 ai2_passive IntroMuro 1
103 playback 0 IntroKonokoSet
104 particle fog_floor1 do start
105 particle fog_floor2a do start
106 trigvolume_enable shinatama1a 1
107 trigvolume_enable shinatama1b 1
108 objective_set 1 silent
109 sleep 1
110 sound_music_start mus_om01 .75
111 }
112
113 #tv12 - after the crossing from the lab to the romm where Muro waits
114 func void murofog(void)
115 {
116 ai2_passive IntroMuro 0
117 env_show 201 1
118 env_show 999 1
119 env_show 250 0
120 env_show 252 0
121 }
122
123 #lose func of IntroMuro
124 func void murodeath(void)
125 {
126 env_show 999 0
127 env_show 1010 0
128 chr_unstoppable IntroMuro 1
129 chr_animate IntroMuro COMCOMlev13_death 120
130 sleep 20
131 chr_delete IntroMuro
132 music_stop
133 sound_music_start atm_gr09 0.75
134 particle fog_floor1 do start
135 particle fog_floor2a do start
136 ai2_spawn ghost_1
137 ai2_spawn ghost_2
138 objective_set 1 silent
139 }
140
141 #tv13 - after the crossing from room to the hall
142 func void bring_the_wall(string char)
143 {
144 trigvolume_enable shinatama1a 1
145 trigvolume_enable shinatama1b 1
146 env_show 1010 1
147 }
148
149 #tv17 - around ghost_1
150 func void ghost_1(string ai_name)
151 {
152 chr_delete ghost_1
153 }
154
155 #tv2 - after tv17 from the left to the right
156 func void shinatama_1a(string ai_name)
157 {
158 sound_dialog_play c12_63_01shinatama
159 ai2_spawn shinatama_1a
160 ai2_lookatme shinatama_1a
161 }
162
163 #tv16- around ghost_2; after tv2
164 func void ghost_2(string ai_name)
165 {
166 chr_delete ghost_2
167 }
168
169 #tv3 - in some distance after tv16 (inside func); from the left to the right;
170 func void shinatama_1b(string ai_name)
171 {
172 ai2_dopath shinatama_1a shinatama_flee_1
173 }
174
175 func void patrolscript0100(string ai_name)
176 {
177 chr_delete shinatama_1a
178 door_lock 7
179 }
180
181 #tv3 (leave func)
182 func void mini_strike(string ai_name)
183 {
184 ai2_spawn mini_strike_1
185 ai2_spawn mini_strike_2
186 ai2_spawn mini_strike_3
187 ai2_spawn mini_strike_4
188 chr_delete ghost_1
189 chr_delete ghost_2
190 }
191
192 #hit func of mini_strike_1
193 func void mini_strike_flee_1(string ai_name)
194 {
195 ai2_dopath mini_strike_1 mini_strike_flee_1
196 }
197
198 #hit func of mini_strike_2
199 func void mini_strike_flee_2(string ai_name)
200 {
201 ai2_dopath mini_strike_2 mini_strike_flee_2
202 }
203
204 #hit func of mini_strike_3
205 func void mini_strike_flee_3(string ai_name)
206 {
207 ai2_dopath mini_strike_3 mini_strike_flee_3
208 }
209
210 #hit func of mini_strike_4
211 func void mini_strike_flee_4(string ai_name)
212 {
213 ai2_dopath mini_strike_4 mini_strike_flee_4
214 }
215
216 func void patrolscript0001(string ai_name)
217 {
218 chr_nocollision mini_strike_1 1
219 playback_block mini_strike_1 cheese1 interp 30
220 chr_delete mini_strike_1
221 }
222 func void patrolscript0002(string ai_name)
223 {
224 chr_nocollision mini_strike_2 1
225 playback_block mini_strike_2 cheese2 interp 30
226 chr_delete mini_strike_2
227 }
228
229 func void patrolscript0003(string ai_name)
230 {
231 chr_nocollision mini_strike_3 1
232 playback_block mini_strike_3 cheese3 interp 30
233 chr_delete mini_strike_3
234 }
235
236 func void patrolscript0004(string ai_name)
237 {
238 chr_nocollision mini_strike_4 1
239 playback_block mini_strike_4 cheese4 interp 30
240 chr_delete mini_strike_4
241 }
242
243 func void patrolscript0110(string ai_name)
244 {
245 chr_delete mini_strike_1
246 }
247
248 func void patrolscript0111(string ai_name)
249 {
250 chr_delete mini_strike_2
251 }
252
253 func void patrolscript0112(string ai_name)
254 {
255 chr_delete mini_strike_3
256 }
257
258 func void patrolscript0113(string ai_name)
259 {
260 chr_delete mini_strike_4
261 }
262
263 #lose func of mini_strike_3
264 func void bighead_1a_var(string ai_name)
265 {
266 bighead_1d_var
267 }
268
269 #lose func of mini_strike_4
270 func void bighead_1b_var(string ai_name)
271 {
272 bighead_1d_var
273 }
274
275 #lose func of mini_strike_2
276 func void bighead_1c_var(string ai_name)
277 {
278 bighead_1d_var
279 }
280
281 #lose func of mini_strike_1
282 func void bighead_1d_var(string ai_name)
283 {
284 var_counter2 = var_counter2 + 1
285 if(var_counter2 eq 4)
286 {
287 sleep 60
288 chr_big_head = 1
289 timer_start 120
290 sleep 7200
291 chr_big_head = 0
292 }
293 }
294
295 #tv14 - at the beginning of the stairs (enter func: fog_floor1off, leave func: fog_floor1on); I've disabled it
296
297 #tv5 - in front of the end of the stairs
298 func void ambush_1a(string ai_name)
299 {
300 chr_delete shinatama_1a
301 ai2_spawn ambush_tanker_1a
302 ai2_spawn ambush_tanker_1b
303 music_stop
304 sound_music_start mus_wls .75
305 door_open 8
306 door_jam 8
307 }
308
309 #lose func of ambush_tanker_1a
310 func void tanker_1_var(string ai_name)
311 {
312 tanker_2_var
313 }
314
315 #lose func of ambush_tanker_1b
316 func void tanker_2_var(string ai_name)
317 {
318 var_counter = var_counter + 1
319 if(var_counter eq 2)
320 {
321 music_stop
322 sound_music_start atm_ft81 .75
323 door_unlock 9
324 var_counter = 0
325 }
326 }
327
328 #tv1 - after door 9
329 func void shinatama_2(string ai_name)
330 {
331 sound_dialog_play c12_63_03shinatama
332 ai2_spawn shinatama_2
333 chr_lock_active shinatama_2
334 ai2_spawn liliput_striker_1
335 ai2_spawn liliput_striker_2
336 ai2_spawn liliput_striker_3
337 door_unjam 8
338 door_lock 11
339 particle fog_floor2a do stop
340 particle fog_floor2b do start
341 }
342
343 func void patrolscript0101(string ai_name)
344 {
345 chr_delete shinatama_2
346 }
347
348 #tv19 - in front of door 11
349 func void red_retreat(string ai_name)
350 {
351 ai2_makeignoreplayer ambush_red_1 1
352 ai2_makeignoreplayer ambush_red_2 1
353 ai2_dopath ambush_red_1 red_retreat_1 1
354 ai2_dopath ambush_red_2 red_retreat_2 1
355 }
356
357 func void patrolscript0007(string ai_name)
358 {
359 ai2_makeignoreplayer ambush_red_1 0
360 ai2_makeignoreplayer ambush_red_2 0
361 }
362
363 #tv8 - after door 11
364 func void ambush_2(string ai_name)
365 {
366 ai2_spawn ambush_red_1
367 music_stop
368 sound_music_start mus_wls .75
369 }
370
371 #hit func of ambush_red_1
372 func void red_1_var(string ai_name)
373 {
374 ai2_spawn ambush_red_2
375 door_unlock 1
376 chr_delete mini_strike_1
377 chr_delete mini_strike_2
378 chr_delete mini_strike_3
379 chr_delete mini_strike_4
380 }
381
382 #lose func of ambush_red_1
383 func void redmusic_1_var(string ai_name)
384 {
385 redmusic_2_var
386 }
387
388 #lose func of ambush_red_2
389 func void redmusic_2_var(string ai_name)
390 {
391 var_counter = var_counter + 1
392 if(var_counter eq 2)
393 {
394 music_stop
395 sound_music_start atm_gr09 0.75
396 door_unlock 2
397 var_counter = 0
398 }
399 }
400
401 #tv4 - in the middle between door 1 and door 2
402 func void shinatama_3(string ai_name)
403 {
404 sound_dialog_play c12_63_04shinatama
405 particle fog_room1 do start
406 ai2_spawn shinatama_3
407 ai2_spawn shin_striker_1
408 ai2_spawn shin_striker_2
409 ai2_spawn shin_striker_3
410 ai2_spawn shin_striker_4
411 }
412
413 func void patrolscript0102(string ai_name)
414 {
415 chr_delete shinatama_3
416 sleep 400
417 chr_delete shin_striker_1
418 chr_delete shin_striker_2
419 chr_delete shin_striker_3
420 chr_delete shin_striker_4
421 }
422
423 ##########
424 ### SP2 ###
425 ##########
426
427 #tv6 and tv15 - in a small distance after door 2
428 func void room_1(string ai_name)
429 {
430 if(save_point eq 2)
431 {
432 particle fog_floor1 do start
433 particle fog_room1 do start
434 }
435 else
436 {
437 fork remove_ai
438 save_game 2 autosave
439 particle fog_floor2b do stop
440 music_stop
441 }
442 door_lock 2
443 ai2_spawn griffin
444 chr_lock_active griffin
445 playback griffin GrifGriffinSet
446 objective_set 2 silent
447 trigvolume_enable room1a 0
448 trigvolume_enable room1b 0
449 trigvolume_enable shinatama3 0
450 sleep 1
451 sound_music_start mus_wls .75
452 }
453
454 #hit func of griffin
455 func void swat_1_var(string ai_name)
456 {
457 door_unlock 2
458 ai2_spawn griffin_b1
459 ai2_spawn griffin_b2
460 }
461
462 #lose func of griffin
463 func void griffindeath(void)
464 {
465 chr_unstoppable griffin 1
466 chr_animate griffin COMCOMlev13_death 120
467 sleep 20
468 chr_delete griffin
469 door_unlock 3
470 }
471
472 #tv20 - in the middle between door 3 and door 4
473 func void show_the_acid(string char)
474 {
475 sound_music_volume mus_wls 0 2
476 music_stop
477 sound_music_start atm_gr09 0.75
478 particle fog_floor1 do stop
479 env_show 1976 1
480 trigvolume_enable splash_trigger 1
481 door_close 3
482 door_lock 3
483 trig_activate 1
484 }
485
486 #tv9 - in some distance after door 4
487 func void laser_cutscene(string ai_name)
488 {
489 door_lock 4
490 ai2_spawn laser_ops_1
491 playback_block laser_ops_1 lstriker_1 interp 30
492 trigvolume_enable lasercutscene 0
493 }
494
495 #tv11 - complete volume under the acid texture
496 func void splash(string character)
497 {
498 if(chr_is_player(character) eq 1)
499 {
500 chr_animate 0 KONOKOacid
501 cm_detach
502 sleep 10
503 sound_impulse_play konoko_gruesome_death
504 sleep 30
505 chr_set_health 0 0
506 }
507 else
508 {
509 chr_animate(character, KONOKOacid);
510 sleep 10
511 chr_set_health(character, 0);
512 }
513 }
514
515 #tv10 - in the middle between door 5 and door 6
516 func void shinatama_nograv(string ai_name)
517 {
518 particle fog_room1 do stop
519 particle fog_room2 do start
520 door_unlock 6
521 door_lock 5
522 }
523
524 #tv7 - in front of door 6
525 func void room2_music(string ai_name)
526 {
527 sound_music_volume atm_ft81 0 2
528 music_stop
529 sound_music_start mus_wls .75
530 }
531
532 #tv18 - after door 6
533 func void room_2(string ai_name)
534 {
535 door_close 6
536 door_lock 6
537 ai2_spawn evilkonoko
538 chr_lock_active evilkonoko
539 playback evilkonoko Kon2Konoko02Set
540 chr_animate evilkonoko KONOKOpowerup 0
541 chr_set_health evilkonoko 400
542 trigvolume_enable room2 0
543 trig_activate 0
544 env_show 1976 0
545 }
546
547 #lose func of evilkonoko
548 func void you_win(string char_index)
549 {
550 fade_out 0 0 0 30
551 sleep 30
552 win
553 }