source: nikanabo/current/bsl/onilight/IGMD/dream_lab/dream_lab.bsl@ 196

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