################# ### VARIABLES ### ################# var int var_counter = 0; ############ ### MAIN ### ############ func void main(void) { gl_fog_red = 0 gl_fog_blue = 0 gl_fog_green = 0 gl_fog_start = .995 gs_farclipplane_set 5000 ui_suppress_prompt = 1 chr_auto_aim_dist = 0 start } ############# ### START ### ############# func void start(string ai_name) { fork deactivate_stuff if(save_point eq 0) fork intro if(save_point eq 1) restore_game if(save_point eq 2) fork save_point_2 if(save_point eq 3) restore_game sleep 5 fork sp_all } func void deactivate_stuff(void) { #not used trigvolume_enable crossfire 0 trigvolume_enable open_ambush_1 0 trigvolume_enable save2 0 trigvolume_enable save_point3 0 trigvolume_enable setobjective_4 0 trigvolume_enable setobjective_5 0 trigvolume_enable strikerguards 0 trigvolume_enable room1_copy_copy 0 trigvolume_enable room1_copy2 0 trigvolume_enable room2 0 trigvolume_enable room2_copy 0 trigvolume_enable room2_stop 0 trigvolume_enable room2_stop_copy2 0 trigvolume_enable room2_stop_copy_copy 0 trigvolume_enable room2_stop_copy 0 trigvolume_enable room3_stop 0 trigvolume_enable room3_stop_copy 0 trigvolume_enable room3_particle_control 0 trigvolume_enable room4_copy 0 trigvolume_enable room4_copy_copy 0 trigvolume_enable trigger_volume_07 0 trigvolume_enable trigger_volume_11_copy 0 trigvolume_enable trigger_volume_16_copy3 0 trigvolume_enable trigger_volume_16_copy_copy2 0 trigvolume_enable trigger_volume_16_copy2_copy2 0 trigvolume_enable trigger_volume_16_copy_copy_copy2 0 trigvolume_enable trigger_volume_16_copy2_copy_copy 0 trigvolume_enable trigger_volume_16_copy_copy_copy_copy 0 trigvolume_enable trigger_volume_36 0 trigvolume_enable trigger_volume_39 0 #used obj_create 81 82 env_shade 777 777 .4 .4 .4 env_show 778 0 chr_delete ShinShin } func void you_lose(string ai_name) { fade_out 0 0 0 30 sleep 30 lose } #################################### ### SEVERAL TIMES USED FUNCTIONS ### #################################### func void sp_all(void) { co_message_display = 0 if(save_point eq 1) save_game 1 autosave if(save_point eq 2) save_game 2 autosave if(save_point eq 3) save_game 3 autosave sleep 180 co_message_display = 1 } func void remove_ai(void) { ai2_kill sleep 60 powerup_reset weapon_reset sleep 240 corpse_reset } func void music_stop(void) { sound_music_stop mus_trt sound_music_stop atm_cl09 sound_music_stop atm_cl10 sound_music_stop atm_cl11 sound_music_stop atm_cl12 sound_music_stop mus_amasian } #tv66, tv67 and tv68 - called up, if you fall from a pipe func void dont_even_try_it(string ai_name) { chr_set_health 0 0 } ########## ### SP0 ### ########## func void intro(void) { particle room1 do start particle room2 do start particle room3 do start ai2_spawn ambush_striker_10 ai2_spawn ambush_striker_11 playback 0 IntroKonoko01 objective_set 1 silent sleep 1 sound_music_start mus_trt } #tv1 - big long box around the railing and the beginning of the stairway func void p1(string ai_name) { music_stop sound_music_start atm_cl09 1.0 ai2_spawn A1_sr01 ai2_spawn A1_t02 ai2_lookatme A1_sr01 ai2_lookatme A1_t02 sleep 120 door_lock 1 door_lock 2 } #lose func of A1_t02 func void backup_1(string ai_name) { ai2_spawn backup_striker1 particle blast1_locklight01 do start door_unlock 1 door_open 1 } #lose func of A1_sr01 func void backup_2(string ai_name) { ai2_spawn backup_striker2 particle blast2_locklight01 do start door_unlock 2 door_open 2 } #tv41 - long box in middle of the 1st hall (proceed from the left to the right side); not used, or better: does not work #tv2 - after door 1 and door 2 func void p2(string ai_name) { ai2_spawn A2_r03 playback A2_r03 redjump ai2_lookatme A2_r03 ai2_spawn aerial_red_2 ai2_passive aerial_red_2 1 playback aerial_red_2 redjump2 ai2_passive aerial_red_2 0 ai2_lookatme aerial_red_2 ai2_spawn red_guard_1 ai2_dopath A1_sr01 patrol_31 ai2_dopath A1_t02 patrol_31 ai2_setjobstate A1_sr01 ai2_setjobstate A1_t02 patrol_31 ai2_spawn ShinShin force playback ShinShin ShinShinSet ai2_setmovementmode ShinShin creep ai2_passive ShinShin 1 ai2_makeblind ShinShin 1 ai2_makedeaf ShinShin 1 chr_lock_active ShinShin chr_unstoppable ShinShin 1 chr_invincible ShinShin 1 chr_nocollision ShinShin 1 } #tv34 - complete volume of the 2nd hall - enter func func void t43(string ai_name) { var_counter = 1 } #tv34 - complete volume of the 2nd hall - leave func func void t43b(string ai_name) { var_counter = 0 } #tv63 - long box in middle of the 2nd hall (proceed from the left to the right side) func void come_to_me(string ai_name) { ai2_dopath ambush_striker1 come_to_me 1 ai2_dopath ambush_striker2 come_to_me 1 ai2_dopath A1_t02 come_to_me 1 ai2_dopath A1_sr01 come_to_me 1 } #tv65 - complete second half of the 2nd hall; only used to check, if there are still enemies in it or not; see next func #tv3 - big field around shinatama func void shin_check(string ai_name) { trigvolume_enable trigger_volume_03 0 if(trigvolume_count(32) eq 0) Shin else { sleep 60 trigvolume_enable trigger_volume_03 1 } } #tv54 - complete volume of the 2nd hall too; used to delete all enemies inside; see next func func void Shin(void) { music_stop sound_music_start atm_cl10 0.0 sound_music_volume atm_cl10 1 5 objective_set 2 silent target_set 7020 60 particle blast1_locklight01 do stop particle blast2_locklight01 do stop door_lock 1 door_lock 2 particle room1 do stop particle room2 do stop particle Shindoor_locklight01 do start door_unlock 3 particle room4 do start ai2_spawn A2_sb04 sound_dialog_play c09_31_27shinatama sound_dialog_play_block pause sleep 600 sound_dialog_play c09_31_28shinatama sleep 600 sound_dialog_play c09_31_29shinatama sleep 330 sound_dialog_play_block pause sleep 15 music_stop sound_ambient_start c06_45_04_explo sleep 10 particle ShinBomb do explode trigvolume_kill 64 if(var_counter ne 0) chr_set_health 0 0 else { fade_out 1 1 1 30 sleep 2 fade_in 30 door_lock 3 particle Shindoor_locklight01 do stop objective_set 3 silent target_set 0 0 } } #tv4 - in front of door 3 func void p5(string ai_name) { ai2_spawn A3_n05 ai2_spawn A3_sb06 } ########## ### SP1 ### ########## #tv69 - in some distance afer door 3 func void new_save1(string ai_name) { if(save_point eq 1) { p5 particle room4 do start objective_set 3 silent } else save_game 1 autosave particle Shindoor_locklight01 do stop door_close 3 door_lock 3 particle room3 do stop } #called up, after you've talked to the guy func void do_console_1(string ai_name) { ai2_doalarm A3_n05 1 } #console1 func void pipe1a(string ai_name) { ai2_passive A3_n05 1 particle room4 do stop timer_start 30 pipe1b sound_music_start atm_cl11 } func void pipe1b(void) { particle room4 do start console_reset 1 music_stop } #tv29 - on the pipe, in some distance after door 4 (func: p36); I've disabled it #tv28 - after door 9 func void killmuro(string ai_name) { music_stop ai2_spawn A4_n07 } #tv5 - in front of door 10 func void p6(string ai_name) { ai2_spawn A4_sr08 ai2_spawn B1_c07 } #tv6 - after door 13 and door 14, not used (func: p7) #tv7 - in the middle of the stairs from 1st floor to 2nd floor func void p8(string ai_name) { trigvolume_enable trigger_volume_08 0 ai2_spawn B2_sb09 ai2_spawn B2_n10 } #tv49 - after door 11 and door 12 func void p9(string ai_name) { ai2_spawn C1_c16 ai2_spawn C1_t11 ai2_spawn C1_sb12 ai2_spawn C1_t13 ai2_spawn C2_sg15 ai2_spawn C2_sr17 ai2_spawn C2_sb14 ai2_spawn C2_t19 } #console6 func void zap_cinematic(string ai_name) { particle doorA_locklight01 do start particle doorB_locklight01 do start door_unlock 15 ai2_spawn vat_bot_1 ai2_spawn vat_bot_2 ai2_spawn vat_bot_3 ai2_spawn vat_bot_4 ai2_spawn vat_bot_5 chr_weapon_immune vat_bot_1 chr_weapon_immune vat_bot_2 chr_weapon_immune vat_bot_3 chr_weapon_immune vat_bot_4 chr_weapon_immune vat_bot_5 particle vatroom1 do start particle zap1 create particle zap2 create particle zap3 create trigvolume_enable save2 1 sleep 1 sound_music_start atm_cl12 0.75 } ########## ### SP2 ### ########## #tv25 - after door 15 func void save_point_2(string ai_name) { if(save_point eq 2) { restore_game zap_cinematic objective_set 4 silent } else save_game 2 autosave particle doorA_locklight01 do stop door_close 15 door_lock 15 particle room4 do stop } #tv64 - complete volume of the vat room (from the floor, where Konoko stands nearly to the ceiling) func void zap_start(string ai_name) { trigvolume_enable zap1 0 if(var_counter eq 0) { particle zap1 do start sleep 120 particle zap1 do stop } if(var_counter eq 0) { particle zap2 do start sleep 120 particle zap2 do stop } if(var_counter eq 0) { particle zap3 do start sleep 120 particle zap3 do stop } sleep 60 trigvolume_enable zap1 1 } #1st console 4 func void zap_timer_1(string ai_name) { var_counter = 1 timer_start 15 zap_start_again } #tv60 - passage to the 1st console 4 func void change_patrol_1(string ai_name) { ai2_dopath vat_bot_2 vat_bot_2b 1 } #2nd console 4 func void zap_timer_2(string ai_name) { var_counter = 1 timer_start 10 zap_start_again } #tv61 - passage to the 2nd console 4 func void change_patrol_2(string ai_name) { ai2_dopath vat_bot_3 vat_bot_3b 1 } #3rd console 4 func void zap_timer_3(string ai_name) { var_counter = 1 timer_start 5 zap_start_again } #tv62 - passage to the 3rd console 4 func void change_patrol_3(string ai_name) { ai2_dopath vat_bot_5 vat_bot_5b 1 } func void zap_start_again(string ai_name) { var_counter = 0 console_reset 4 } #tv35 to tv40 - called up, if a chara falls into the acid func void splash(string character) { if(chr_is_player(character) eq 1) { cm_detach chr_animate 0 KONOKOacid sleep 10 sound_impulse_play konoko_gruesome_death chr_set_health 0 0 } else { chr_animate(character, KONOKOacid); sleep 10 chr_set_health(character, 0); } } #after door 16 func void red_ambush(string ai_name) { music_stop ai2_spawn ambush_red_1 } #tv10 - after door 19 and door 20 func void p10(string ai_name) { ai2_spawn D1_sr20 ai2_spawn D1_sb21 particle doorB_locklight01 do stop door_lock 16 particle zap1 kill particle zap2 kill particle zap3 kill particle vatroom1 do stop trigvolume_enable strikerguards 1 } #tv9 - long box (from the left side to the right side) in some distance in front of door 21 func void striker_guards(string ai_name) { ai2_spawn striker_guard_1 ai2_spawn striker_guard_2 particle room6 do start } #tv51 - in front of door 21 (func: striker_guards); I've disabled it #tv31 - in front of door 21 too (func: p11); I've disabled it too #tv50 - after door 21 (func: cross_fire); I've disabled it #tv10 - after door 22 func void p12(string ai_name) { ai2_spawn D2_sg24 ai2_spawn D2_f25 ai2_spawn D2_sb26 playback D2_sb26 piperun ai2_spawn pipe_guard_1 ai2_spawn pipe_guard_2 } #console8 func void pipe2a(void) { particle room6 do stop timer_start 30 pipe2b sound_music_start atm_cl11 } func void pipe2b(void) { music_off particle room6 do start console_reset 8 } #tv58 - after door 27 func void pipe2_music_off(void) { music_stop particle save3_locklight01 do start } #tv11 - in front of door 28 func void p13(string ai_name) { ai2_spawn E1_sr28 ai2_spawn E1_sb29 ai2_spawn E1_sr30 ai2_spawn ambush_comguy_1 ai2_spawn E1_n31 ai2_spawn E1_n32 ai2_spawn E1_n37 particle pipe3 do create particle pipe3 do start } #tv33 - after door 33 (funcs: p11 and save_point_3); I've disabled it ########## ### SP3 ### ########## #tv 32 - in some distance after door 28 func void p11b(string ai_name) { trigvolume_enable p11b_vol 0 if(save_point eq 3) p13 else save_game 3 autosave particle save3_locklight01 do stop door_close 28 door_lock 28 objective_set 5 silent particle room6 do stop } #lose func of E1_sr30 func void warnbigroom(string ai_name) { ai2_makeaware E1_sr28 char_0 ai2_makeaware E1_sb29 char_0 } #tv48 - 1st floor, at the beginning of the stairs to the 2nd floor func void spawn_EC_guards(string ai_name) { ai2_spawn E1_sb29 ai2_spawn E1_c33 ai2_spawn E1_c40 ai2_spawn E1_f34 ai2_spawn E1_f40 ai2_spawn E1_f35 } #tv53 - at the same place as tv48 (func: set_objective_5); I've disabled it #tv59 - 3rd floor, at the beginning of the stairs to the 4th floor func void final_guards(string ai_name) { ai2_spawn final_guard_1 ai2_spawn final_guard_2 } #console14 func void tctf_control(string ai_name) { sound_music_start mus_amasian 1.0 particle elev1_locklight01 do start particle elev2_locklight01 do start door_unlock 37 door_unlock 38 ai2_spawn E2_sr38 ai2_spawn E2_sr39 } #tv30 - in front of door 37 (func: p39); I've disabled it #tv12 - after door 37 func void elevator(void) { fade_out 0 0 0 30 sleep 30 fork_rmove_ai env_show 778 1 env_shade 778 778 .3 .3 .3 ai2_spawn F_r40 playback 0 ElevatorTop fade_in 30 fork wait_for_help } func void wait_for_help(void) { chr_wait_health F_r40 70 ai2_spawn TCTF1051 ai2_spawn TCTF1052 ai2_spawn TCTF1053 ai2_spawn TCTF1054 chr_lock_active 1051 chr_lock_active 1052 chr_lock_active 1053 chr_lock_active 1054 chr_changeteam TCTF1051 TCTF chr_changeteam TCTF1052 TCTF chr_changeteam TCTF1053 TCTF chr_changeteam TCTF1054 TCTF playback TCTF1051 OutroSwatEnter ai2_attack TCTF1053 char_0 sleep 60 playback TCTF1052 OutroSwatEnter ai2_attack TCTF1054 char_0 sleep 50 playback TCTF1053 OutroLiteEnter ai2_attack TCTF1051 char_0 sleep 70 playback TCTF1054 OutroLiteEnter ai2_attack TCTF1052 char_0 } #console15 func void pipe3(void) { sound_music_volume mus_amasian 0 2 music_stop particle pipe3 kill sound_music_start atm_cl11 timer_start 20 pipe3b } func void pipe3b(void) { music_stop particle pipe3 do create particle pipe3 do start console_reset 15 } #tv13 - after door 39; circa after a quarter of the lenght of the pipe func void outro(void) { fade_out 0 0 0 30 sleep 30 win } ##################### ### TEXT CONSOLES ### ##################### func void level10a(string chr_index) { text_console level_10a console_reset 2 } func void level10b(string chr_index) { text_console level_10b console_reset 7 }