################# ### 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) restore_game if(save_point eq 5) fork load_s5 sleep 5 fork sp_all } func void deactivate_stuff(void) { #not used trigvolume_enable trigger_volume_08_copy 0 trigvolume_enable trigger_volume_09 0 trigvolume_enable trigger_volume_10_copy 0 trigvolume_enable trigger_volume_10_copy_copy 0 trigvolume_enable trigger_volume_11_copy 0 trigvolume_enable trigger_volume_11_copy_copy 0 trigvolume_enable trigger_volume_14 0 #used env_show 802 0 env_show 822 0 particle power1 do start particle power2 do start trigvolume_enable trigger_volume_02 0 trigvolume_enable trigger_volume_06 0 trigvolume_enable trigger_volume_12 0 trigvolume_enable trigger_volume_13 0 trigvolume_enable trigger_volume_40 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 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_main01 sound_music_stop mus_sad1 sound_music_stop mus_space01 sound_music_stop mus_asian sound_music_stop mus_fiteb } ########## ### SP1 ### ########## func void intro(void) { playback 0 IntroKonokoSet01 ai2_spawn A1_intro01 ai2_spawn A1_intro02 ai2_spawn A1_bluedoorstriker objective_set 1 silent target_set 5007 30 sleep 1 sound_music_start mus_main01 .75 } #lose func of A1_intro01 and A1_intro02 func void die_for_art(string ai_name) { var_counter = var_counter + 1 if(var_counter eq 2) music_stop } #console1 func void target02(string ai_name) { particle blue_locklight01 do start particle b2_locklight01 do start target_set 2001 30 trigvolume_enable trigger_volume_12 1 music_stop } #tv12 - in front of door 30 func void target03(string ai_name) { ai2_spawn A1_s_red01 ai2_spawn A1_s_red02 target_set 5007 30 } #called up, when A1_s_red02 gives you the hypo func void change_patrol(string ai_name) { ai2_dopath A1_s_red02 patrol_45 ai2_setjobstate A1_s_red02 } #tv4 - in front of door 31 func void tv04(string ai_name) { ai2_spawn A2_s_tank01 ai2_spawn A2_s_blue13 ai2_spawn A2_s_blue01 ai2_spawn A2_s_blue03 ai2_spawn A2_s_red03 ai2_spawn char_1 ai2_spawn A2_s_tank02 } #tv3 - in front of door 33 func void tv03(string ai_name) { ai2_spawn A2_s_blue09 } #tv34 - at the beginning of the first pillar, which is nearby to the room with console3 func void tv34(string ai_name) { ai2_spawn A2_s_red04 } #console3 func void ontv02(string ai_name) { trigvolume_enable trigger_volume_02 1 particle el_red1 kill particle el_1_locklight01 do start target_set 108 30 } #called up, when A2_s_red04 gives you the w4_psm func void spawn_sniper1(string ai_name) { ai2_spawn sniper1 ai2_makeignoreplayer sniper1 1 playback_block sniper1 sniper1_jump ai2_makeignoreplayer sniper1 0 ai2_dopath sniper1 patrol_52 ai2_setjobstate sniper1 sleep 600 ai2_makeignoreplayer sniper1 1 ai2_dopath sniper1 patrol_53 ai2_setjobstate sniper1 } #hit func of sniper1 func void hurt_sniper1(string ai_name) { ai2_makeignoreplayer sniper1 1 ai2_dopath sniper1 patrol_53 ai2_setjobstate sniper1 } #in some distance after the room with console3, in front of the elevator func void tv33(string ai_name) { ai2_makeignoreplayer A2_s_red04 1 ai2_dopath A2_s_red04 patrol_54 ai2_setjobstate A2_s_red04 } #tv2 - flat box on the elevator platform func void tv02(string ai_name) { fade_out 0 0 0 30 sleep 30 fork remove_ai obj_kill 801 playback 0 Elev1KonokoSet load_s2 fade_in 30 var_counter = 0 } func void load_s2(void) { env_show 802 1 ai2_spawn B1_s_blue05 ai2_spawn B1_s_green01 ai2_spawn new_dummy1 ai2_spawn C1_blue22 ai2_spawn C2_blue25 ai2_dopath B1_s_blue05 patrol_08_blue05b ai2_setjobstate B1_s_blue05 chr_teleport B1_s_blue05 1046 objective_set 1 silent target_set 1083 30 sleep 1 sound_music_start mus_sad1 0.3 sound_music_volume mus_sad1 0.8 2 } ########## ### SP2 ### ########## #tv35 - after the elevator platform func void s2(string ai_name) { if(save_point eq 2) { fork remove_ai load_s2 } else save_game 2 autosave } #console12 func void target06(string ai_name) { particle green_locklight01 do start target_set 2005 30 trigvolume_enable trigger_volume_13 1 } #tv13 - in front of door 34 func void target05(string ai_name) { ai2_spawn B1_s_Red01 target_set 133 30 music_stop } #tv1 - in front of door 35 func void tv01(string ai_name) { ai2_spawn whiteneut ai2_spawn C1_blue22 ai2_spawn B2_s_blue06 ai2_spawn B2_s_blue07 ai2_spawn B2_s_blue08 ai2_spawn B2_s_tank04 } #console4 func void target08(string ai_name) { particle white_locklight01 do start target_set 3001 30 } #tv14 - in front of door 36 (the same func as tv13, so I've disabled it) #tv5 - in front of door 37 func void tv05(string ai_name) { ai2_spawn B3_s_green02 ai2_spawn C1_blue20 } #tv15 - at the end of the both ways after door 37 func void target10(string ai_name) { target_set 5008 30 } #tv16 - at the end of the passageway to the other side func void target11(string ai_name) { target_set 5009 30 } #tv42 - huge box around the complete ways to the 2nd elevator (only used as a chara counter, see next funcs) #lose func of C2_blue25 and respawn1 func void script_respawn1(void) { if(trigvolume_count(42) eq 0) { var_counter2 = var_counter2 + 1 if(var_counter2 eq 1) { ai2_spawn respawn1 chr_giveweapon respawn1 w7_scc } if(var_counter2 eq 2) { ai2_spawn respawn1 chr_giveweapon respawn1 w3_phr ai2_dopath patrol_08_blue05 ai2_setjobstate respawn1 } if(var_counter2 eq 3) { ai2_spawn respawn1 chr_giveweapon respawn1 w2_sap } } } #lose func of C1_blue20 and respawn2 func void script_respawn2(void) { if(trigvolume_count(42) eq 0) { var_counter3 = var_counter3 + 1 if(var_counter3 eq 1) { ai2_spawn respawn2 chr_giveweapon respawn2 w3_phr } if(var_counter3 eq 2) { ai2_spawn respawn2 chr_giveweapon respawn2 w2_sap ai2_dopath patrol_19_blue20b ai2_setjobstate respawn2 } if(var_counter3 eq 3) { ai2_spawn respawn2 chr_giveweapon respawn2 w2_sap } } } #lose func of C1_blue22 func void script_respawn3(void) { if(trigvolume_count(42) eq 0) ai2_spawn C1_red21 } #tv37 - box around the place, where you find the 2nd mercury bow func void t37(string ai_name) { ai2_spawn new_1 ai2_spawn new_2 } #tv38 - about in the middle func void t38(string ai_name) { ai2_spawn new_3 ai2_spawn new_4 } #console6 func void ontv06(string ai_name) { trigvolume_enable trigger_volume_06 1 particle el_2_locklight01 do start target_set 119 30 } ########## ### SP3 ### ########## #tv6 - flat box on the elevator platform func void tv06(string ai_name) { fade_out 0 0 0 30 sleep 30 fork remove_ai load_s3 chr_teleport 0 120 chr_facetoflag 0 120 fade_in 30 if(save_point ne 3) save_game 3 autosave } func void load_s3(void) { if(save_point eq 3) { fork remove_ai restore_game } obj_kill 821 env_show 822 1 ai2_spawn D1_neut05 objective_set 2 silent target_set 128 30 sleep 1 sound_music_start mus_space01 0.75 } #console7 func void target14(string ai_name) { particle red_locklight01 do start target_set 2085 30 } #tv20 - in front of door 38 func void tv25(string ai_name) { ai2_spawn D1_red30 ai2_spawn D1_neut02 ai2_spawn D2_blue60 ai2_spawn D1_neut10 ai2_spawn new_5 ai2_spawn D2_blue61 music_stop } #called up, after you have talked to the guy func void power_deactivate(void) { ai2_doalarm D1_neut02 9 ai2_dopath D1_neut02 patrol_80 ai2_setjobstate D1_neut02 } #console9 func void power_lull_1(string ai_name) { music_stop ai2_neutralbehavior D1_neut02 none target_set 125 30 sound_music_start mus_asian .75 particle power1 do stop timer_start 20 power_lull_1b } func void power_lull_1b(void) { music_stop particle power1 do start sleep 300 console_reset 9 } #tv17 - at the end of the pipe func void target13(string ai_name) { target_set 128 30 } ########## ### SP4 ### ########## #tv30 - in front of door 23 func void s4(string ai_name) { if(save_point eq 4) { fork remove_ai load_s4 } else save_game 4 autosave } func void load_s4(void) { particle red_locklight01 do start ai2_spawn D2_blue61 ai2_spawn D2_blue60 ai2_spawn new_5 ai2_spawn D1_neut10 trigvolume_enable trigger_volume_17 0 trigvolume_enable trigger_volume_25 0 trigvolume_enable trigger_volume_30 0 objective_set 2 silent target_set 128 30 } #tv39 - box around the place, where D1_neut10 gives you a hypo func void t39(string ai_name) { trigvolume_enable trigger_volume_40 1 } #tv40 - in the middle between tv39 and door 22 func void t40(string ai_name) { ai2_spawn new_6 ai2_spawn new_7 } #console10 func void target17(string ai_name) { particle yellow_locklight01 do start target_set 3094 30 } #tv41 - in front of door 24 func void spawn2tube(string ai_name) { ai2_spawn D2_red62 ai2_spawn D2_tank63 ai2_spawn new_8 ai2_spawn sci_maniac } #console11 func void power_lull_2(string ai_name) { sound_music_start mus_asian .75 particle power2 do stop ai2_spawn new_10 ai2_spawn new_67 ai2_spawn D3_tank65 timer_start 20 power_lull_2b } func void power_lull_2b(void) { music_stop particle power2 do start sleep 300 console_reset 11 } #tv19 - on the pipe, in some distance in front of the platform with console13 func void target19(string ai_name) { target_set 5010 30 } ### POSSIBILITY 1: YOU RUN TO THE END OF THE PIPE ### #tv36 - box around the place, where you find the w5_sbg func void t36(string ai_name) { ai2_spawn sbg_1 ai2_spawn sbg_2 ai2_spawn sbg_3 } ### POSSIBILITY 2: YOU JUMP TO THE PLATFORM WITH CONSOLE 13 ### #tv7 - at the beginning of the staircase func void tv07(string ai_name) { chr_delete new_1 chr_delete new_2 chr_delete new_3 chr_delete new_4 chr_delete new_5 chr_delete new_6 chr_delete new_7 chr_delete new_8 chr_delete sci_maniac chr_delete D1_blue50 chr_delete D2_blue60 chr_delete D2_blue61 chr_delete D1_neut02 chr_delete D1_neut05 chr_delete D1_neut10 chr_delete D1_red30 chr_delete D2_red62 chr_delete D3_red66 chr_delete D2_tank63 chr_delete D3_tank65 ai2_spawn F_friend ai2_spawn F_blue73 ai2_spawn F_blue1 target_set 5006 30 } ########## ### SP5 ### ########## #console8 func void unlock_bwhite(string ai_name) { if(save_point ne 5) save_game 5 autosave particle bwhite_locklight01 do start objective_set 3 silent } func void load_s5(void) { if(save_point eq 5) { fork remove_ai restore_game } particle bwhite_locklight01 do start door_unlock 4 ai2_spawn F_blue1 console_deactivate 8 trigvolume_enable trigger_volume_07 0 objective_set 3 silent target_set 5006 30 var_counter = 1 } #tv10 - in front of door 3 func void tv10(string ai_name) { ai2_spawn F_blue69 ai2_spawn F_blue2 } #tv11 - in front of door 2 func void tv11(string ai_name) { ai2_spawn F_tank70 } #tv8 - in front of door 1 func void tv08(string ai_name) { ai2_spawn end01 ai2_spawn end02 ai2_spawn end03 sleep 60 ai2_dopath F_tank70 patrol_5004 ai2_setjobstate F_tank70 ai2_dopath F_blue69 patrol_5005 ai2_setjobstate F_blue69 ai2_dopath F_blue2 patrol_5004 ai2_setjobstate F_blue2 ai2_dopath F_blue1 patrol_5006 ai2_setjobstate F_blue1 ai2_dopath F_blue73 patrol_5006 ai2_setjobstate F_blue73 ai2_attack F_tank70 char_0 ai2_attack F_blue69 char_0 ai2_attack F_blue2 char_0 ai2_attack F_blue1 char_0 ai2_attack F_blue73 char_0 sound_music_start mus_fiteb .75 } #tv29 - after door 1 func void tv29(string ai_name) { sound_music_start mus_fiteb .75 } #lose func of end01, end02, end03, F_blue1, F_blue2, F_blue69, F_blue73 and F_tank70 func check_death(string ai_name) { var_counter = var_counter + 1 if(var_counter eq 8) { fade_out 0 0 0 30 sleep 30 win } } ##################### ### TEXT CONSOLES ### ##################### func void console_pipe(void) { text_console level_9d console_reset 13 } func void text9a(void) { text_console level_9a console_reset 2 } func void text9b(void) { text_console level_9b console_reset 5 } func void text9c(void) { text_console level_9c console_reset 14 }