################# ### VARIABLES ### ################# var int var_counter = 0; var int var_counter2 = 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) save_point = 1 if(save_point eq 1) fork intro if(save_point eq 2) restore_game if(save_point eq 3) { restore_game sleep 1 if(trigvolume_count(5) eq 0) fork save_point_2 } if(save_point eq 4) restore_game if(save_point eq 5) fork save_point_5 sleep 5 fork sp_all } func void deactivate_stuff(void) { #not used trigvolume_enable ratend 0 trigvolume_enable trigger_volume_03 0 trigvolume_enable trigger_volume_04 0 trigvolume_enable trigger_volume_40 0 trigvolume_enable trigger_volume_41_copy 0 trigvolume_enable unfinishedbusiness 0 #used door_lock 35 particle gas2 do stop particle gaslight1 do stop trig_hide 1 trig_hide 2 trig_hide 3 trig_hide 4 trigvolume_enable rappel_point 0 trigvolume_enable trigger_volume_08 1 trigvolume_enable tripwire 1 } 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 if(save_point eq 4) save_game 4 autosave if(save_point eq 5) save_game 5 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_om03 sound_music_stop atm_gr09 sound_music_stop mus_asian sound_music_stop atm_cl09 sound_music_stop mus_space01 } #tv43, 46 and 47 func void fire_damage(string ai_name) { chr_poison(ai_name, 5, 30, 30); } ########## ### SP1 ### ########## func void intro(void) { playback 0 IntroKonokoSet sleep 5 ai2_spawn Start_Friend_1 ai2_spawn Start_Striker_5 ai2_makeaware Start_Striker_5 Start_Friend_1 particle room1 do start sleep 15 sound_dialog_play c00_01_28shinatama sleep 30 objective_set 1 silent target_set 7124 30 sound_music_start mus_om03 } func void patrolscript0200(string char_index) { playback_block Start_Friend_1 roll fromhere ai2_dopath Start_Friend_1 Start_Friend_1b 1 ai2_setjobstate Start_Friend_1 } #tv9 - in the middle of the passage from the start room to the hall func void Start1(string char_index) { ai2_spawn Start_Striker_1 ai2_spawn Start_Striker_2 ai2_spawn Start_Comguy_1 } #tv11- at the end of the passage func void mad_bomber1(string ai_name) { ai2_spawn mad_bomber1 sleep 150 particle bomb1 do explode particle squib1a do explode particle squib1b do explode sleep 60 particle bomb2 do explode particle squib2 do explode sleep 30 particle bomb_damage1 do start } #lose func of Start_Striker_5 and Start_Comguy_1 and Hangar1_A_Striker_3 func void striker_lullaby_1(string ai_name) { var_counter = var_counter + 1 if(var_counter eq 2) { music_stop var_counter = 0 } } #tv14 - in some distance in front of the corner of the right wall; from left to right func void victim_thug1(string ai_name) { ai2_spawn victim_thug1 ai2_spawn cruel_striker1 } #console11 func void lock2(string ai_name) { particle lock2_locklight01 do start trigvolume_enable hidden_friends1 1 music_stop } #tv15 - in the middle of the passage to door 41 func void hidden_thugs(string ai_name) { ai2_spawn Start_Friend_2 ai2_spawn Start_Friend_3 } #console 12 func void lock1(void) { particle lock1_locklight01 do start target_set 7125 30 } ########## ### SP2 ### ########## #tv1 - in some distance after door 11 func void tarmac(string ai_name) { if(save_point ne 2) { fork remove_ai save_game 2 autosave particle lock1_locklight01 do stop door_close 11 door_lock 11 particle room1 do stop particle bomb_damage1 do stop } particle compound create ai2_spawn tarmac_striker_1 ai2_spawn tarmac_striker_2 ai2_spawn tarmac_striker_3 ai2_spawn tarmac_tanker_1 ai2_spawn tarmac_tanker_2 ai2_spawn tarmac_commguy_1 objective_set 2 silent target_set 7037 30 sleep 1 sound_music_start atm_gr09 0.75 sound_dialog_play c00_01_18shinatama } #tv18 - big box around the entrance of the area which is fenced in (where the mad bomber waits) func void striker_tee_off(string ai_name) { ai2_dopath tarmac_striker_4 tarmac_striker_3b 1 } #tv19 - compled area which is fenced in (where the mad bomber waits) #hit func of tarmac_striker_3 func void tanker_backup(string ai_name) { ai2_dopath tarmac_tanker_2 tarmac_tanker_2b 1 } #tv17 - after door 46; from left to right func void unlock_commguy(string ai_name) { ai2_dopath tarmac_commguy_1 tarmac_commguy_2 1 ai2_dopath tarmac_tanker_2 tarmac_tanker_2c 1 music_stop } #console 1 func void Hangar1_A(void) { particle lock3_locklight01 do start door_unlock 12 target_set 7085 30 } #tv12 and 45 - in some distance after door 12 func void muro_bait(string ai_name) { trigvolume_enable murobait_a 0 trigvolume_enable murobait_b 0 particle compound kill door_close 12 door_lock 12 ai2_spawn muro1 ai2_spawn escort_striker1 ai2_spawn escort_striker2 playback muro1 muro1 interp 30 playback escort_striker1 escort_striker1 interp 30 playback escort_striker2 escort_striker2 interp 30 sound_music_start mus_asian 0.75 particle garage1_locklight02 do start door_open 26 door_jam 26 ai2_spawn Hangar1_A_Striker_1 ai2_spawn Hangar1_A_Striker_2 ai2_spawn Hangar1_A_Striker_3 playback Hangar1_A_Striker_2 hangar1_striker2 interp 30 playback Hangar1_A_Striker_3 hangar1_striker3 interp 30 playback Hangar1_A_Striker_1 hangar1_striker1 interp 30 sleep 30 sound_dialog_play c00_01_20shinatama objective_set 3 silent target_set 0 0 sleep 600 chr_delete muro1 chr_delete escort_striker1 chr_delete escort_striker2 } #lose func of Hangar1_A_Striker_1 func void striker_lullaby_2(string ai_name) { striker_lullaby_1 } ### WAY TO THE GAS TUNNEL ### #console13 func void rat_door(string ai_name) { particle lock9_locklight02 do start door_unlock 24 } #tv48 - after door 26 func void low_target_clear(string ai_name) { target_set 0 0 } #tv49 - after tv48 func void low_target_set(string ai_name) { target_set 7085 30 } #tv2 - in some distance after tv49 func void hangar1a(string char_index) { ai2_spawn Hangar1_B_Striker_1 ai2_spawn Hangar1_B_Striker_4 } #lose func of Hangar1_B_Striker_1 and Hangar1_B_Striker_4 func void hangar1d_var(string ai_name) { var_counter = var_counter + 1 if(var_counter eq 2) { particle garage2_locklight02 do start door_unlock 19 door_open 19 door_jam 19 ai2_spawn hangar1d_enemy_1 ai2_spawn hangar1d_enemy_2 } } #lose func of hangar1d_enemy_1 and hangar1d_enemy_2 func void hangar1f_var(string ai_name) { var_counter = var_counter + 1 if (var_counter eq 4) { particle garage3_locklight02 do start door_unlock 20 door_open 20 door_jam 20 ai2_spawn hangar1f_enemy_1 ai2_spawn hangar1f_enemy_3 ai2_spawn rat_thug_4 var_counter = 0 } } #tv39 - after door 20 (entry func: skip_ratscene); I've disabled it #hit func of hangar1f_enemy_3 func void hangar1d_backup(string ai_name) { ai2_spawn hangar1f_enemy_2 } func void patrolscript0500(string ai_name) { playback_block hangar1f_enemy_2 bomber_jump interp 30 } #tv31 - after the beginning of the ramp func void gas_trig_show(string ai_name) { trig_show 1 trig_show 2 trig_show 3 trig_show 4 console_deactivate 14 console_deactivate 15 door_open 48 door_jam 48 } ### WAY TO THE ROOF ### #tv13 - from the left wall (at the end of the right side of door 26) to the right wall func void hangar1b(string ai_name) { ai2_spawn superball_striker } #tv50 - at the beginning of the first plattform; at the end of the first ramp func void high_target_clear(string ai_name) { target_set 0 0 } #tv51 - after tv50 func void high_target_set(string ai_name) { target_set 7126 30 } #console 8 func void lock5(void) { particle lock5c_locklight01 do start lock_check } #tv30 - after the room with console 3; left side; at the end of the ramp func void hangar1c(string char_index) { ai2_spawn Hangar1_B_Striker_5 ai2_spawn Hangar1_B_Striker_9 ai2_spawn Hangar1_A_Tanker_1 ai2_spawn Hangar1_B_Comguy_12 } #console 3 func void lock5a_var(string ai_name) { particle lock5a_locklight01 do start lock_check } #tv4 - the platform with door 21 and door 22; first half of the platform (tv without any func); I've disabled it #console 33 func void lock5b_var(string ai_name) { particle lock5b_locklight01 do start lock_check } func void lock_check(void) { var_counter2 = var_counter2 + 1 if(var_counter2 eq 1) music_stop if(var_counter2 eq 3) { door_unlock 21 door_unlock 22 roof_guys } } func void roof_guys(void) { #particles particle carpool create particle carpool do start particle roof2 do start particle roof3 do start #roof1 ai2_spawn ahah_badman_1 ai2_spawn ahah_badman_2 ai2_spawn Roof1_Striker_1 ai2_spawn Roof1_Striker_2 #roof2 ai2_spawn carpool_striker_1 ai2_spawn Roof2_Striker_1 ai2_spawn Roof2_Striker_2 ai2_spawn Roof2_Striker_3 #tv trigvolume_enable trigger_volume_08 0 } ########## ### SP3 ### ########## ### GAS TUNNEL ### #tv5 - in some distance after door 24 func void save_point_3(string ai_name) { if(save_point eq 3) { gas_trig_show objective_set 3 silent target_set 7085 30 } else { fork remove_ai save_game 3 autosave particle lock9_locklight02 do stop door_close 24 door_lock 24 } ai2_spawn Rat_Tanker_1 ai2_spawn Rat_Comguy_1 sleep 1 sound_music_start atm_cl09 0.75 trigvolume_enable save2 0 trigvolume_enable save3 0 } #tv28 - the complete volume of the tunnel (tv name: gas) func void poison_konoko(string ai_name) { chr_poison(0, 10, 60, 90); } #fired off by touching the triggers (lasers) func void gas(string ai_name) { particle gas1 do start particle gas2 do start particle gaslight1 do start console_activate 14 console_activate 15 door_unjam 48 door_close 48 door_jam 48 trigvolume_enable gas 1 } #console 14 and console 15 func void gas_off(string ai_name) { particle gas1 do stop particle gas2 do stop particle gaslight1 do stop console_reset 14 console_reset 15 console_deactivate 14 console_deactivate 15 door_unjam 48 door_open 48 door_jam 48 trigvolume_enable gas 0 } #tv27 - in some distance in front of door 48 (entry func: Rat_Guards); I've disabled it #tv29 - after door 48 func void gas_kill(string ai_name) { particle gas1 do stop particle gas2 do stop particle gaslight1 do stop door_unjam 48 door_close 48 trig_hide 1 trig_hide 2 trig_hide 3 trig_hide 4 } #tv32 - in some distance in front of door 35 func void gas_trig_hide(string ai_name) { roof_guys } ### ROOF ### #tv26 - long volume after door 21 and door 22 func void save_point_2(string ai_name) { if(save_point eq 3) { fork roof_guys objective_set 3 silent } else { save_game 3 autosave particle lock5a_locklight01 do stop particle lock5b_locklight01 do stop particle lock5c_locklight01 do stop door_close 21 door_close 22 door_lock 21 door_lock 22 } target_set 7085 30 trigvolume_enable save2 0 trigvolume_enable save3 0 sleep 1 sound_music_start atm_cl09 1.0 } #tv21 - complete left end of the roof #tv20 - at the beginning of the cul-de-sac func void secret_striker(string char_index) { ai2_spawn secret_striker_1 } #notice func of secret_striker_1 func void secret_tanker(string char_index) { ai2_spawn secret_tanker_1 } #tv22 - complete front end of the roof #tv23 - complete right end of the roof #tv24 - at the roof of the gas tunnel; from the left to the right; start left: at the beginning of the first short ramp func void low_roadies_1(string ai_name) { ai2_spawn Back_Striker_1 ai2_spawn Back_Striker_2 ai2_spawn Back_Striker_3 ai2_spawn Back_Thug_1 } #notice func of Back_Striker_3 func void sos_2(string char_index) { ai2_spawn sos_badman_2 } #tv25 - at the end of the underpass of the gas tunnel func void low_roadies_2(string ai_name) { ai2_spawn Back_Tanker_1 ai2_spawn Back_Thug_2 ai2_spawn Back_Thug_3 } ### BOTH WAYS FUSE ### func void carpool_backup(string char_index) { ai2_spawn carpool_striker_2 } #tv42 - huge box around the carpool (entry func: carpool_start; exit func: carpool_stop); I've disabled it #tv6 - on the roof of the underpass to console 10; at the beginning (top) of the ramp func void Back3(string char_index) { ai2_spawn Roof3_Striker_1 ai2_spawn Roof3_Striker_2 ai2_spawn Roof3_Tanker_1 } #hit func of Roof3_Tanker_1 func void roof3_backup1(string char_index) { ai2_dopath Roof3_Striker_1 Roof3_Striker_1b 1 } #tv33 - huge box around the underpass to console 10; includes the roof of the underpass func void back_compound(string char_index) { ai2_spawn compound_tanker_1 ai2_spawn compound_bomber_1 } #tv41 - huge wall from left to right over the complete area below and the roof; starts in some distance after the stiarway to door 27 func void remote_parking(string ai_name) { ai2_spawn hostage_thug_1 ai2_spawn hostage_thug_2 ai2_spawn hostage_thug_3 ai2_spawn squad_tanker_1 ai2_spawn squad_tanker_2 var_counter2 = 10 } #lose func of squad_tanker_1 func void remote_backup_1(string ai_name) { ai2_spawn hostage_striker_1 } #lose func of squad_tanker_2 func void remote_backup_2(string ai_name) { ai2_spawn hostage_striker_2 } ########## ### SP4 ### ########## #console 10 func void save_point_4(string ai_name) { trigvolume_enable trigger_volume_08 1 particle lock6_locklight01 do start door_unlock 27 if(save_point eq 4) { console_deactivate 10 particle carpool create particle carpool do start particle roof2 do start particle roof3 do start trigvolume_enable backcompound 0 trigvolume_enable hidden1a 0 trigvolume_enable hidden1b 0 trigvolume_enable lowroad1 0 trigvolume_enable lowroad2 0 trigvolume_enable lowroad3 0 trigvolume_enable lowroad4 0 trigvolume_enable remote 0 trigvolume_enable save2 0 trigvolume_enable trigger_volume_07 0 } else { fork remove_ai music_stop fade_out 0 0 0 30 sleep 30 chr_teleport 0 2020 chr_peace 0 fade_in 30 save_game 4 autosave } target_set 7060 30 objective_set 4 silent sound_dialog_play c00_01_19shinatama } #tv7 - in front of door 27 func void Office1(string char_index) { if(var_counter2 ne 10) fork save_point_4 ai2_spawn Office1_Comguy_1 ai2_spawn Office1_Comguy_11 ai2_spawn Office2_Striker_1 ai2_spawn Office2_Striker_3 ai2_spawn Office3_Tanker_12 ai2_spawn neutral_1 ai2_spawn neutral_2 sleep 1 sound_music_start atm_gr09 } #tv44 - around the box with the lsi func void objective_check(string ai_name) { if(chr_has_lsi(0)) { trigvolume_enable objectivecheck 0 objective_set 5 silent target_set 7127 30 particle lock6_locklight01 do stop door_lock 27 particle carpool do stop particle carpool kill particle roof2 do stop particle roof3 do stop } } #tv36 - in the middle of the stairs to door 33 func void lsi_check_1(string ai_name) { if(chr_has_lsi(0)) { trigvolume_enable tripwire 1 music_stop } } #tv34 - in some distance in front of door 36 func void ambush(string ai_name) { ai2_spawn ambush_striker_1 if(save_point ne 5) { particle lock7_locklight01 do start door_unlock 36 ai2_spawn ambush_commguy_1 sleep 220 ai2_doalarm ambush_commguy_1 4 } sleep 1 sound_music_start mus_space01 0.75 } ########## ### SP5 ### ########## #tv8 - after door 36 func void save_point_5(string ai_name) { trigvolume_enable hangar2_setup 0 if(save_point eq 5) { restore_game ambush objective_set 5 silent } else { save_game 5 autosave particle lock7_locklight01 do stop door_close 36 door_lock 36 } particle muroplane_prop do start particle rotorwash do start ai2_spawn Hangar2_tanker_1 ai2_spawn alarm_striker_1 target_set 1054 30 } #console 4 func void raise_alarm(string char_index) { ai2_dopath alarm_striker_1 alarm_striker_1a 1 fork alarm_sound_script } func void alarm_sound_script(void) { sound_ambient_start alarm_loop sleep 900 sound_ambient_stop alarm_loop } #tv35 - in front of door 42 func void alarm_patrol(string char_index) { ai2_dopath alarm_striker_1 alarm_striker_1b 1 } #tv37 - in some distance after door 42 func void final_muro(string char_index) { ai2_spawn muro2 ai2_spawn escort_striker3 ai2_spawn escort_striker4 playback escort_striker3 final_escort3 playback escort_striker4 final_escort4 playback muro2 final_muro sleep 960 chr_delete muro2 chr_delete escort_striker3 sleep 60 chr_delete escort_striker4 } #tv38 - on the last but one platform; at the beginning of the last part of the ramp func void Hangar2b(string char_index) { ai2_spawn Hangar2_Striker_3 ai2_spawn Hangar2_Striker_4 ai2_spawn Hangar2_Striker_5 } #lose func of Hangar2_Striker_5 func void striker_showdown_1(string ai_name) { striker_showdown_3 } #lose func of Hangar2_Striker_4 func void striker_showdown_2(string ai_name) { striker_showdown_3 } #lose func of Hangar2_Striker_3 func void striker_showdown_3(string ai_name) { var_counter = var_counter + 1 if(var_counter eq 3) { trigvolume_enable rappel_point 1 particle rappel create target_set 1054 30 music_stop } } #tv10 - at the rappel point func void lsi_check_2(string ai_name) { fade_out 0 0 0 30 sleep 30 win } ##################### ### TEXT CONSOLES ### ##################### func void level6a(void) { text_console level_6a console_reset 16 } func void level6b(void) { text_console level_6b console_reset 9 } func void level6c(void) { text_console level_6c console_reset 13 } func void level6d(void) { text_console level_6d console_reset 17 } func void level6e(void) { text_console level_6e console_reset 5 } func void level6f(void) { text_console level_6f console_reset 2 }