################# ### VARIABLES ### ################# var int var_counter = 0; var int var_counter2 = 0; var int var_counter3 = 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) fork load_s3 if(save_point eq 4) fork grif sleep 5 fork sp_all } func void deactivate_stuff(void) { #not used trigvolume_enable trigger_volume_01 0 trigvolume_enable trigger_volume_01_copy 0 trigvolume_enable trigger_volume_01_copy2 0 trigvolume_enable trigger_volume_04 0 trigvolume_enable trigger_volume_04_copy 0 trigvolume_enable trigger_volume_04_copy_copy 0 trigvolume_enable trigger_volume_04_copy2 0 trigvolume_enable trigger_volume_09 0 trigvolume_enable trigger_volume_11 0 trigvolume_enable trigger_volume_15 0 trigvolume_enable trigger_volume_25 0 trigvolume_enable trigger_volume_26 0 trigvolume_enable trigger_volume_27 0 trigvolume_enable trigger_volume_44 0 trigvolume_enable trigger_volume_45 0 trigvolume_enable attack_1tv 0 door_lock 35 door_lock 36 door_lock 37 door_lock 39 door_lock 40 door_lock 41 #used trigvolume_enable trigger_volume_10 0 trigvolume_enable trigger_volume_12 0 trigvolume_enable trigger_volume_21 0 trigvolume_enable trigger_volume_21_copy 0 trigvolume_enable trigger_volume_31 0 trigvolume_enable trigger_volume_33 0 trigvolume_enable attack_2tv 0 trigvolume_enable attack_3tv 0 trigvolume_enable attack_3tv_copy 0 trigvolume_enable attack_4tv 0 env_shade 912 913 .4 .4 .4 env_show 911 0 env_show 914 0 env_show 915 0 env_show 916 0 env_show 151 0 env_show 152 0 env_show 153 0 env_show 154 0 env_show 155 0 env_show 156 0 env_show 157 0 env_show 158 0 env_show 159 0 env_show 251 0 env_show 252 0 env_show 253 0 env_show 254 0 env_show 255 0 env_show 256 0 env_show 257 0 env_show 258 0 env_show 259 0 } 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 sleep 180 co_message_display = 1 } func void remove_ai(void) { ai2_kill sleep 60 weapon_reset powerup_reset sleep 240 corpse_reset } func void music_stop(void) { sound_music_stop mus_om01 sound_music_stop mus_main03_hd sound_music_stop mus_asianb } #tv38 and tv40 func void deathfall(void) { cm_detach sleep 30 chr_set_health 0 0 } ########## ### SP1 ### ########## func void intro(void) { particle snow1 do start particle snow2 do start particle snow3 do start playback 0 IntroKonokoSet chr_set_health 0 400 ai2_spawn A_S1 ai2_spawn A_S2 ai2_spawn A_E3 ai2_spawn A_E5 ai2_spawn A_E5b ai2_dopath A_S1 patrol_01b ai2_setjobstate A_S1 objective_set 1 silent sleep 1 sound_music_start mus_om01 .9 } #tv1 - from an imaginary line (from the end of the rigt fence to the left fence) to the fence behind you # (enter func: snow1_start, leave func: snow1_stop); I've disabled it #tv3 - after tv1, ends in front of door 2 (enter func: snow2_start, leave func: snow2_stop); I've disabled it #tv2 - huge box right on tv3 (enter func: snow3_start, leave func: snow3_stop); I've disabled it #tv39 - in front of the imaginary line of tv1 func void t38(string ai_name) { ai2_spawn A_E4 ai2_spawn A_Sb63 ai2_spawn A_E6 ai2_spawn A_Sb7 ai2_spawn new_2 } #tv6 - in front of the truck entrance door with the blue lights (func: peak_start); I've disabled it #tv4 - after the truck entrance door with the blue lights (func: peak_stop); I've disabled it #tv5 - in front of the truck entrance door with the red lights (func: peak_start); I've disabled it #tv7 - after the truck entrance door with the red lights (func: peak_stop); I've disabled it #tv31 - after door 2 func void set_objective_2(string ai_name) { ai2_spawn B_Sr9 ai2_spawn B_Eb11 ai2_spawn B_Eb16 ai2_spawn B_Esb15 particle door12_locklight01 do start objective_set 2 silent target_set 558 30 music_stop } #hit func of A_Sb7 func void run1(string ai_name) { ai2_doalarm A_Sb7 1 ai2_dopath A_Sb7 patrol_00 } func void patrolscript0054(string ai_name) { ai2_doalarm A_Sb7 1 } #console1 func void run1_alarm(string ai_name) { fork do_alarm_sound ai2_dopath A_E3 patrol_49 ai2_dopath A_E4 patrol_49 ai2_dopath A_E5 patrol_49 ai2_dopath A_E6 patrol_49 ai2_spawn B_Sr9 sleep 7 ai2_dopath B_Sr9 patrol_10 ai2_spawn B_Eb11 sleep 60 ai2_dopath B_Eb11 patrol_10 } func void do_alarm_sound(void) { sound_ambient_start alarm_loop sleep 900 sound_ambient_stop alarm_loop } func void patrolscript0080(string ai_name) { ai2_tripalarm 1 char_0 } #tv9 - in front of console6, from the left wall trough the room to the right wall (func: t9); I've disabled it) ########## ### SP2 ### ########## #tv37 - after door 12 func void s2(string ai_name) { if(save_point eq 2) { objective_set 2 silent target_set 558 30 } else { fork remove_ai save_game 2 autosave particle snow1 do stop particle snow2 do stop particle snow3 do stop } ai2_spawn C_Sr17 ai2_spawn C_Sr18 ai2_spawn C_Sr19 ai2_spawn C_Sb75 ai2_spawn C_Sb76 ai2_spawn C_Sb78 ai2_dopath C_Sr17 patrol_17 ai2_setjobstate C_Sr17 ai2_dopath C_Sr18 patrol_18 ai2_setjobstate C_Sr18 } #tv9 - after the left passageway #tv27 - after door 13 func void t8(string ai_name) { particle door12_locklight01 do stop door_lock 12 ai2_spawn C_Tb20 ai2_spawn C_Eb29 ai2_spawn C_Eb30 ai2_spawn C_Eb21 ai2_spawn C_Eb22 ai2_spawn C_N23 ai2_spawn C_N24 } ### POSSIBILITY 1 - YOU FALL DOWN ### #console4 func void unlock_stairs2(string ai_name) { unlock_stairs_both ai2_spawn C_b74 ai2_spawn C_Eb73 chr_teleport C_b74 224 chr_teleport C_Eb73 237 ai2_dopath C_b74 patrol_80 ai2_dopath C_Eb73 patrol_80 } func void unlock_stairs_both(string ai_name) { music_stop particle stair_locklight01 do start door_unlock 10 door_unlock 15 door_unlock 16 door_unlock 17 ai2_spawn S_Tr41 trigvolume_enable trigger_volume_10 1 trigvolume_enable trigger_volume_12 1 console_deactivate 3 console_deactivate 4 } #tv26 - between door 16 and door 17, in the middle of the staircase (func: t27); I've disabled it #tv11 - on the left side after door 17 func void t12(string ai_name) { t10 } #tv24 - the complete way from after door 18 to the room with door 14 (no func); I've disabled it ### POSSIBILITY 2 - YOU DON'T FALL DOWN ### #tv23 - the complete way from after door 19 to the room with door 13 (no func); I've disabled it #console5 func void unlock44(string ai_name) { ai2_spawn C_Er79 door_unlock 44 particle d1_locklight01 do start sound_music_start mus_main03_hd target_set 559 30 } #console3 func void unlock_stairs(string ai_name) { unlock_stairs_both target_set 1 0 } #tv25 - after door 15 func void t11(string ai_name) { ai2_dopath C_Sb25 patrol_48 sleep 60 ai2_dopath C_Sb26 patrol_48 sleep 60 ai2_dopath C_Eb27 patrol_48 } #t10 - on the right side after door 44 func void t10(string ai_name) { trigvolume_enable trigger_volume_10 0 trigvolume_enable trigger_volume_12 0 obj_create 51 59 env_anim 51 59 sleep 10 sound_ambient_start c05_26_17_trucka sleep 270 env_setanim 51 truckbackstop env_setanim 52 truckcabstop env_setanim 53 truckdoorstop env_setanim 54 truckdoor2stop env_setanim 55 truckwheel03stop env_setanim 56 truckwheel04stop env_setanim 57 truckwheel05stop env_setanim 58 truckwheel06stop env_setanim 59 truckwheel07stop ai2_spawn ParkStriker chr_lock_active ParkStriker chr_envanim ParkStriker ParkStrikeBox01 norotation sleep 40 sound_ambient_start c05_31_21_brake_doorsa sleep 60 chr_animate ParkStriker STRIKElev7_Park ai2_spawn C_Sb25 ai2_spawn C_Sb26 ai2_spawn C_Eb27 playback C_Sb25 truckers sleep 40 playback C_Sb26 truckers sleep 30 playback C_Eb27 truckers sleep 60 obj_kill 51 59 env_show 151 1 env_show 152 1 env_show 153 1 env_show 154 1 env_show 155 1 env_show 156 1 env_show 157 1 env_show 158 1 env_show 159 1 sound_music_start mus_asianb particle obj1 create target_set 511 30 objective_set 3 silent sleep 480 ai2_dopath C_Sb25 patrol_48 sleep 60 ai2_dopath C_Sb26 patrol_48 sleep 60 ai2_dopath C_Eb27 patrol_48 } #tv28 - the complete ground floor; used to count the enemies inside; see next func #tv22 - in front of the driver's door of the truck func void runTruck(string ai_name) { trigvolume_enable trigger_volume_23 0 if(chr_has_lsi(0) and trigvolume_count(29) eq 0) { music_stop fade_out 0 0 0 30 sleep 30 fork remove_ai particle obj1 kill load_s3 playback 0 TruckExitKonoko fade_in 30 if(save_point ne 3) save_game 3 autosave } else { sleep 60 trigvolume_enable trigger_volume_23 1 } } ########## ### SP3 ### ########## func void load_s3(void) { if(save_point eq 3) restore_game env_show 251 1 env_show 252 1 env_show 253 1 env_show 254 1 env_show 255 1 env_show 256 1 env_show 257 1 env_show 258 1 env_show 259 1 env_show 911 1 env_show 912 0 env_show 913 0 env_show 914 1 env_show 915 1 env_show 916 1 ai2_spawn D_R33 objective_set 4 silent target_set 501 30 } #tv12 - at the beginning of the stairs, which are in front of door 24 func void t13(string ai_name) { ai2_spawn E_Er34 sleep 60 door_unlock 24 particle purple_locklight01 do start ai2_dopath E_Er34 patrol_34 ai2_setjobstate E_Er34 ai2_spawn E_Eb35 } #tv15 - after door 24 func void t16(string ai_name) { ai2_spawn E_Nr36 ai2_spawn E_Nb37 ai2_spawn E_Nb38 ai2_spawn E_Nr39 door_unlock 22 particle purple3_locklight01 do start target_set 1 0 } ### 2ND FLOOR ### #tv13 - in front of door 33 func void t14(string ai_name) { ai2_spawn E_N35 ai2_spawn E_Tr40 } #tv14 - in front of door 30 (func: t15); I've disabled it #tv44 - in front of door 25 (func: t45); I've disabled it #tv45 - in front of door 27 (func: t45); I've disabled it #console200 - room with door 30 (right side) func void purple2_unlock(string ai_name) { particle purple2_locklight01 do start door_unlock 20 door_unlock 21 door_unlock 22 door_unlock 23 door_unlock 24 door_unlock 25 door_unlock 26 door_unlock 27 door_unlock 28 trigvolume_enable trigger_volume_21 1 trigvolume_enable trigger_volume_21_copy 1 console_deactivate 100 console_deactivate 200 if(var_counter ne 10) target_set 556 30 } #tv20 - after door 25 func void t21(string ai_name) { t22 } #tv21 - after door 27 func void t22(string ai_name) { trigvolume_enable trigger_volume_21 0 trigvolume_enable trigger_volume_21_copy 0 sound_music_start mus_main03_hd particle mainchamber_locklight01 do start door_unlock 18 door_unlock 19 ai2_spawn D_R31 ai2_spawn D_R32 ai2_spawn D_E83 door_open 18 door_open 19 sleep 180 door_close 18 door_close 19 door_lock 18 door_lock 19 particle mainchamber_locklight01 do stop sleep 420 music_stop } ### 3RD FLOOR ### #tv18 - in front of door 34 func void t19(string ai_name) { ai2_spawn E_Er45 ai2_spawn E_N43 } #tv16 - in front of door 31 func void t17(string ai_name) { ai2_spawn E_Nr46 } ### 1ST FLOOR ### #tv19 - in front of door 32 func void t20(string ai_name) { ai2_spawn E_N44 } #tv17 - in front of door 29 func void t18(string ai_name) { ai2_spawn E_R46 } #console100 - room with door 29 (right side) func void purple2_unlock_b(string ai_name) { purple2_unlock if(var_counter ne 1 or var_counter ne 11 or var_counter ne 101) target_set 555 30 trigvolume_enable trigger_volume_21 0 trigvolume_enable trigger_volume_21_copy 0 } ### TEXT CONSOLES ### #console301 - 3rd floor - room with door 34 (left side) func void console301(string ai_name) { console300 } #console300 - 3rd floor - room with door 31 (right side) func void console300(string ai_name) { var_counter = var_counter + 1 if(var_counter eq 1 or var_counter eq 101) target_set 556 30 if(var_counter eq 11) target_set 555 30 if(var_counter eq 111) target_set 547 30 console_deactivate 300 console_deactivate 301 ConsoleText } #console201 - 2nd floor - room with door 33 (left side) func void console200(string ai_name) { var_counter = var_counter + 10 if(var_counter eq 10 or var_counter eq 110) target_set 557 30 if(var_counter eq 11) target_set 555 30 if(var_counter eq 111) target_set 547 30 ConsoleText } #console101 - 1st floor - room with door 32 (left side) func void console101(string ai_name) { var_counter = var_counter + 100 if(var_counter eq 100 or var_counter eq 101) target_set 556 30 if(var_counter eq 110) target_set 557 30 if(var_counter eq 111) target_set 547 30 ConsoleText } func void ConsoleText(void) { if(var_counter eq 1 or var_counter eq 10 or var_counter eq 100) { text_console level_19a sound_dialog_play c15_57_01konoko } if(var_counter eq 11 or var_counter eq 101 or var_counter eq 110) { text_console level_19b sound_dialog_play c15_57_02konoko } if(var_counter eq 111) { text_console level_19c sound_dialog_play c15_57_03konoko trigvolume_enable attack_1tv 1 trigvolume_enable attack_2tv 1 trigvolume_enable attack_3tv 1 trigvolume_enable attack_3tv_copy 1 trigvolume_enable attack_4tv 1 objective_set 5 silent sleep 60 sound_music_start mus_main03_hd var_counter = 0 } } ### ALL CONSOLES ACTIVATED ### #tv37 - 3rd floor - after door 34 (left side) func void attack_4(string ai_name) { attack_3 } #tv34 - floor 3 - after door 31 (right side) func void attack_2(string ai_name) { attack_3 } #tv33 - 1st floor - after door 29 (right side) (func: attack_1); I've disabled it #tv46 - 2nd floor - after door 34 (left side) #tv35 - 1st floor - after door 32 (left side) func void attack_3(string ai_name) { trigvolume_enable attack_2tv 0 trigvolume_enable attack_3tv 0 trigvolume_enable attack_3tv_copy 0 trigvolume_enable attack_4tv 0 particle F_locklight01 do start door_unlock 43 ai2_spawn F_Eb43 ai2_spawn F_Eb44 ai2_spawn F_Eb47 ai2_dopath F_Eb43 patrol_43 ai2_setjobstate F_Eb43 sleep 30 ai2_dopath F_Eb44 patrol_44 ai2_setjobstate F_Eb44 sleep 30 ai2_dopath F_Eb47 patrol_47 ai2_setjobstate F_Eb47 music_stop ai2_dopath F_Eb43 patrol_43b ai2_setjobstate F_Eb43 ai2_dopath F_Eb44 patrol_44b ai2_setjobstate F_Eb44 ai2_dopath F_Eb47 patrol_47b ai2_setjobstate F_Eb47 trigvolume_enable trigger_volume_33 1 } #tv32 - in front of door 43 func void t33(string ai_name) { sound_dialog_play c15_57_04konoko ai2_spawn F_Er86 ai2_spawn F_Nr87 target_set 258 30 } #tv41 - in front of the 1st staircase func void t41(string ai_name) { ai2_spawn F_Er59 } #tv42 - after the 1st staircase func void t42(string ai_name) { ai2_spawn F_Nr60 } #tv43 - in front of the 2nd staircase func void t43(string ai_name) { ai2_spawn F_R61 ai2_spawn F_Er88 ai2_spawn F_C62 ai2_makeignoreplayer F_C62 1 } #tv29 - at the mezzanine of the 3rd staircase func void t30(string ai_name) { ai2_makeignoreplayer F_C62 0 ai2_spawn F_Er89 } #hit func of F_C62 func void comalarm(string ai_name) { ai2_tripalarm 2 char_0 } #console2 func void fconsole_ok(string ai_name) { text_console level_19d particle green create particle green2 create particle green3 create trigvolume_enable trigger_volume_31 1 objective_set 6 silent target_set 502 30 } #tv30 - complete dish platform func void t31(string ai_name) { target_set 1 0 fade_out 0 0 0 30 sleep 30 fork remove_ai particle green kill particle green2 kill particle green3 kill playback 0 GrifKonokoSet grif fade_in 30 if(save_point ne 4) save_game 4 autosave } ########## ### SP4 ### ########## func void grif(void) { if(save_point eq 4) restore_game env_show 301 0 env_show 302 0 env_show 303 0 env_show 304 0 env_show 305 0 env_show 306 0 env_show 307 0 env_show 308 0 env_show 309 0 env_show 401 1 env_show 402 1 env_show 403 1 env_show 404 1 env_show 405 1 env_show 406 1 env_show 407 1 env_show 408 1 env_show 409 1 ai2_spawn Muro chr_boss_shield Muro chr_set_health Muro 500 ai2_spawn GrifElite01 ai2_spawn GrifElite02 ai2_spawn GrifElite03 ai2_dopath GrifElite01 patrol_513 ai2_dopath GrifElite02 patrol_514 ai2_dopath GrifElite03 patrol_518 if(did_kill_griffen() eq 0) { ai2_boss_battle = 1 ai2_spawn Griffin ai2_spawn GrifOps01 ai2_spawn GrifOps02 ai2_spawn GrifOps03 ai2_dopath GrifOps01 patrol_521 ai2_dopath GrifOps02 patrol_515 ai2_dopath GrifOps03 patrol_517 sleep 1 fork wait_to_help } if(did_kill_griffen() eq 1) { ai2_boss_battle = 0 sleep 1 fork heli } particle dishpulse do start particle sturm_ambient do start sound_ambient_start mc_dish_loop 0.6 sound_music_start mus_ot objective_set 6 silent } func void heli(void) { sound_ambient_start c07_17_19heli sleep 480 obj_create 901 906 env_anim 901 906 ai2_spawn GrifOps01 ai2_spawn GrifOps02 ai2_spawn GrifOps03 chr_envanim GrifOps01 GrifOps01Box01 chr_envanim GrifOps02 GrifOps02Box01 chr_envanim GrifOps03 GrifOps03Box01 chr_animate GrifOps01 STRIKEcrouch_idle 400 chr_animate GrifOps02 STRIKEcrouch_idle 400 chr_animate GrifOps03 STRIKEcrouch_idle 400 sleep 290 env_setanim 901 heli_doors_rt08 env_setanim 902 heli_doors_lt08 env_setanim 903 heli_rotorblades08 env_setanim 904 heli_body08 env_setanim 905 heli_canopy08 env_setanim 906 heli_interior08 chr_envanim GrifOps01 GrifOps01Box02 norotation chr_envanim GrifOps02 GrifOps02Box02 norotation chr_envanim GrifOps03 GrifOps03Box02 norotation chr_animate GrifOps01 STRIKElev7_Ops01 chr_animate GrifOps02 STRIKElev7_Ops02 chr_animate GrifOps03 STRIKElev7_Ops03 chr_changeteam GrifOps01 Syndicate chr_changeteam GrifOps02 Syndicate chr_changeteam GrifOps03 Syndicate ai2_attack GrifOps01 char_0 ai2_attack GrifOps02 char_0 ai2_attack GrifOps03 char_0 sleep 600 obj_kill 901 906 } func void wait_to_help(void) { chr_wait_health Muro 200 ai2_boss_battle = 0 var_counter3 = 1 attack_konoko } #lose func of GrifOps01, GrifOps02, GrifOps03 and Griffin func void swat_dies(void) { var_counter = var_counter + 1 if(var_counter eq 4) attack_konoko } func void attack_konoko(void) { ai2_attack GrifElite01 char_0 ai2_attack GrifElite02 char_0 ai2_attack GrifElite03 char_0 ai2_attack GrifElite04 char_0 ai2_attack GrifElite05 char_0 ai2_attack GrifElite06 char_0 } #lose func of GrifElite03 func void check_death1a(string ai_name) { ai2_spawn GrifElite04 ai2_passive GrifElite04 1 playback_block GrifElite04 GrifWave2_Run1 ai2_passive GrifElite04 0 if(var_counter3 eq 1) ai2_attack GrifElite04 char_0 if(var_counter3 eq 0) ai2_makeaware GrifElite04 char_0 } #lose func of GrifElite02 func void check_death1b(string ai_name) { ai2_spawn GrifElite05 ai2_passive GrifElite05 1 playback_block GrifElite05 GrifWave2_Run1 ai2_passive GrifElite05 0 if (var_counter3 eq 1) ai2_attack GrifElite05 char_0 if (var_counter3 eq 0) ai2_makeaware GrifElite05 char_0 } #lose func of GrifElite04 and GrifElite05 func void final_round(string ai_name) { var_counter2 = var_counter2 + 1 if(var_counter2 eq 1) { ai2_spawn GrifElite06 ai2_passive GrifElite06 1 playback_block GrifElite06 GrifWave2_Run3 ai2_passive GrifElite06 0 if(var_counter3 eq 1) ai2_attack GrifElite06 char_0 if(var_counter3 eq 0) ai2_makeaware GrifElite06 char_0 } } #lose func of Muro func void check_death2(string ai_name) { fade_out 0 0 0 30 sleep 30 win } ##################### ### TEXT CONSOLES ### ##################### func void console_truckinfo(void) { text_console level_19e console_reset 6 }