################# ### 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) restore_game if(save_point eq 4) restore_game if(save_point eq 5) restore_game sleep 5 fork sp_all } func void deactivate_stuff(void) { #not used trigvolume_enable shinzom_voice1 0 trigvolume_enable shinzom_voice2 0 trigvolume_enable shinzom_voice3 0 trigvolume_enable shinzom_voice4 0 trigvolume_enable trigger_volume_03 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_05 0 trigvolume_enable trigger_volume_07b 0 trigvolume_enable trigger_volume_10 0 trigvolume_enable trigger_volume_12 0 trigvolume_enable trigger_volume_14 0 trigvolume_enable trigger_volume_16 0 trigvolume_enable trigger_volume_20 0 trigvolume_enable trigger_volume_34 0 trigvolume_enable trigger_volume_37 0 trigvolume_enable trigger_volume_38 0 trigvolume_enable trigger_volume_41 0 trigvolume_enable trigger_volume_44 0 trigvolume_enable trigger_volume_45 0 trigvolume_enable trigger_volume_46 0 trigvolume_enable trigger_volume_49 0 trigvolume_enable trigger_volume_51 0 trigvolume_enable trigger_volume_52 0 trigvolume_enable trigger_volume_54 0 trigvolume_enable trigger_volume_55 0 trigvolume_enable trigger_volume_56 0 trigvolume_enable trigger_volume_57 0 trigvolume_enable trigger_volume_61 0 trigvolume_enable trigger_volume_67 0 trig_deactivate 10 trig_deactivate 91 trig_deactivate 92 trig_deactivate 93 trig_deactivate 94 trig_deactivate 910 trig_deactivate 210 trig_deactivate 310 trig_deactivate 410 trig_deactivate 510 trig_deactivate 214 trig_deactivate 314 trig_deactivate 414 trig_deactivate 514 trig_deactivate 2101 trig_deactivate 3101 trig_deactivate 4101 trig_deactivate 5101 env_show 403 0 env_show 1010 0 door_lock 4 door_lock 5 door_lock 6 door_lock 7 door_lock 8 door_lock 9 console_deactivate 3 console_deactivate 399 console_deactivate 400 console_deactivate 401 console_deactivate 402 #used trigvolume_enable trigger_volume_06 0 trigvolume_enable trigger_volume_29 0 trigvolume_enable trigger_volume_35 0 trigvolume_enable trigger_volume_39 0 if(save_point ne 0 and save_point ne 1) deactivate_sp1 if(save_point ne 2) deactivate_sp2 if(save_point ne 3) deactivate_sp3 env_shade 321 325 .3 .3 .3 env_show 171 0 env_show 172 0 env_show 173 0 env_show 174 0 door_lock 42 } func void deactivate_sp1(void) { trig_deactivate 60 trig_deactivate 61 trig_deactivate 62 trig_deactivate 63 trig_deactivate 64 trig_deactivate 65 trig_deactivate 70 trig_deactivate 71 trig_deactivate 72 trig_deactivate 73 trig_deactivate 74 trig_deactivate 75 } func void deactivate_sp2(void) { trig_deactivate 6 trig_deactivate 7 trig_deactivate 98 trig_deactivate 99 } func void deactivate_sp3(void) { trig_deactivate 1 trig_deactivate 2 trig_deactivate 3 trig_deactivate 4 trig_deactivate 5 trig_deactivate 8 trig_deactivate 100 trig_deactivate 101 trig_deactivate 302 trig_deactivate 303 trig_deactivate 315 trig_deactivate 320 trig_deactivate 500 trig_deactivate 501 trig_deactivate 502 trig_deactivate 503 trig_deactivate 400 trig_deactivate 510 trig_deactivate 511 trig_deactivate 512 trig_deactivate 520 trig_deactivate 521 trig_deactivate 522 } 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_main03 sound_music_stop mus_wls sound_music_stop mus_trt sound_music_stop mus_sv } ########## ### SP1 ### ########## func void intro(void) { particle roof_doors_locklight01 do start particle griffin_locklight01 do start door_unlock 61 door_unlock 67 door_unlock 71 chr_teleport 0 19 chr_inv_reset 0 ai2_spawn l1 ai2_spawn l3 ai2_spawn l7 ai2_spawn A_L8 ai2_spawn A_L12 ai2_spawn A_L18 ai2_spawn A_L19 ai2_spawn A_Lbo13 objective_set 1 silent target_set 590 30 sleep 1 sound_music_start mus_main03 1.0 } #tv1 - the complete volume between the doors 61, 63, 67 and 68 func void t2(string ai_name) { trigvolume_enable trigger_volume_61 0 ai2_spawn n5 ai2_spawn A_Sbo14 ai2_dopath A_Sbo14 patrol_14 ai2_setjobstate A_Sbo14 ai2_spawn A_Sbo15 sleep 30 ai2_dopath A_Sbo15 patrol_14 ai2_setjobstate A_Sbo15 music_stop } #neutral func of n5 func void outta_sight(string ai_name) { ai2_dopath n5 patrol_99 ai2_setjobstate n5 } #tv61 - at the same place as tv1 (entry func: t61); I've disabled it #console 5 func void roof(string ai_name) { trigvolume_enable trigger_volume_06 1 particle roof_locklight01 do start ai2_spawn A_T25 } #console 12 func void roof_door2(string ai_name) { particle roof_door2_locklight01 do start ai2_spawn A_n17 ai2_dopath A_n17 patrol_16 ai2_setjobstate A_n17 } #tv3 - long box behind door 63 and the windows (entry func: t4); I've disabled it #tv4 - long box behind door 68 and the windows (entry func: t4); I've disabled it #tv66 - long box behind the windows on the elevator side (entry func: t4); I've disabled it #tv67 - long box behind the windows on the opposite side of tv66 (entry func: t4); I've disabled it #tv2 - after door 59 (entry func: t3); I've disabled it #tv5 - after door 58 func void t6(string ai_name) { ai2_spawn A_L20 ai2_spawn A_L21 target_set 593 30 trig_activate 6 } ########## ### SP2 ### ########## #tv46 - on the platform between the stairs to the hall func void s2(string ai_name) { if(save_point eq 2) { objective_set 1 silent target_set 593 30 } else { fork remove_ai save_game 2 autosave particle roof_locklight01 do stop door_lock 59 trig_activate 7 trig_activate 98 trig_activate 99 deactivate_sp1 } particle shin_lock_locklight01 do start door_unlock 14 door_unlock 48 ai2_spawn B_S22 } ### HALL - 2ND FLOOR ### #tv6 - near the end of the stairs func void t7(string ai_name) { ai2_dopath B_S22 patrol_23 ai2_setjobstate B_S22 ai2_spawn B_N28 ai2_dopath B_N28 patrol_42 ai2_setjobstate B_N28 ai2_spawn B_Lbo26 playback_block B_Lbo26 run1 interp 20 sleep 20 ai2_dopath B_Lbo26 patrol_27 ai2_setjobstate B_Lbo26 } #hit func of B_S22 func void B_S22_run (string ai_name) { ai2_dopath B_S22 patrol_24 ai2_setjobstate B_S22 } func void patrolscript0001(void) { playback_block B_S22 taunt1 interp 20 } #tv12 - at the same place as tv6 (entry func: t7b); Ive disabled it #tv7 - after door 54 and the window next to it func void t8(string ai_name) { ai2_spawn B_L41 ai2_spawn B_S36 ai2_makeignoreplayer B_S36 0 ai2_spawn B_S37 ai2_makeignoreplayer B_S37 0 ai2_spawn B_Sbo38 ai2_makeignoreplayer B_Sbo38 0 sound_music_start mus_wls 1.0 sound_dialog_play c14_54_24konoko sound_dialog_play_block pause objective_set 2 silent } #tv59 - behind door 56 and the window next to it func void t59(string ai_name) { ai2_spawn B_L30 ai2_spawn B_L95 ai2_spawn B_Lbo27 } #tv11 - after the right furniture in the room with door 64 (entry func: t12); I've disabled it #tv37 - on the platform between the stairs func void t43(string ai_name) { ai2_spawn B_S29 ai2_spawn B_S43 ai2_spawn B_S96 } ### HALL - 1ST FLOOR ### #tv68 - behind door 60 and the window next to it (entry func: t67); I've disabled it #tv8 - behind door 55 and the window next to it (entry func: t10); I've disabled it #tv34 - in front of door 50 and the window next to it (entry func: t38); I've disabled it #tv60 - on the platform between the stairs func void t60(string ai_name) { ai2_spawn B_C32 ai2_spawn B_C33 ai2_spawn B_C34 } ### HALL - GROUND FLOOR ### #tv9 - after door 48 func void t11(string ai_name) { trigvolume_enable trigger_volume_11_copy 0 t11_funcs } #tv25 - big volume on the ground func void t11b(string ai_name) { trigvolume_enable trigger_volume_11 0 t11_funcs } func void t11_funcs(void) { ai2_dopath B_S36 patrol_38 ai2_setjobstate B_S36 ai2_spawn B_Lbo76 ai2_spawn B_C32 ai2_spawn B_C33 ai2_spawn B_C34 music_stop } #tv69 - in front of the wall with the high window next to door 48 func void t68(string ai_name) { ai2_spawn mbo_femcop } #tv40 - after door 14 (no funcs); I've disabled it #tv42 - on the platform between the stairs (entry func: t45); I've disabled it ########## ### SP3 ### ########## #tv44 - at the same place as tv42 func void save3_and_spine(string ai_name) { if(save_point eq 3) objective_set 2 silent else { fork remove_ai save_game 3 autosave particle shin_lock_locklight01 do stop door_lock 14 deactivate_sp2 trig_activate 1 trig_activate 2 trig_activate 3 trig_activate 4 trig_activate 5 trig_activate 8 trig_activate 100 trig_activate 101 trig_activate 302 trig_activate 303 trig_activate 400 trig_activate 500 trig_activate 501 trig_activate 502 trig_activate 503 trig_activate 510 trig_activate 511 trig_activate 512 trig_activate 520 trig_activate 521 trig_activate 522 trig_activate 315 trig_activate 320 } ai2_spawn C_C47 ai2_spawn C_C65 ai2_spawn C_L50 ai2_spawn C_L51 ai2_spawn C_N48 ai2_spawn C_N55 ai2_spawn C_N60 ai2_spawn C_Sbo44 ai2_spawn C_Sbo93 ai2_makeignoreplayer C_C65 1 ai2_makeignoreplayer C_L50 1 ai2_makeignoreplayer C_L51 1 ai2_makeignoreplayer C_N55 1 particle spine1 do start particle spine2 do start particle spine3 do start particle spinesound1 do start particle spinesound2 do start particle spinesound3 do start target_set 587 30 sleep 1 sound_music_start mus_trt 0.8 } #tv39 - in some diastance after tv44 (entry func: t45b); I've disabled it ### ATRIUM - 7TH FLOOR ### #tv13 - in the middle between the end of the stairs and the entrance of the room with console 10 (entry func: t14); I've disabled it #tv49 - medium volume around console 10 (no funcs); I've disabled it #neutral func of C_N48 func void patrolscript0098(string ai_name) { ai2_doalarm C_N48 10 } #tv48 - in front of console 10 func void t40(string ai_name) { trigvolume_enable trigger_volume_40 0 var_counter = 1 check_consoles } #console 10 func void powersub1(string ai_name) { if(var_counter eq 0) { trigvolume_enable trigger_volume_40 0 var_counter2 = var_counter2 + 1 } var_counter3 = var_counter3 + 1 particle spine1 do stop particle spinesound1 do stop if(var_counter3 eq 1 or var_counter3 eq 101) target_set 594 30 if(var_counter3 eq 11) target_set 595 30 if(var_counter3 eq 111) power_off } #tv14 at the beginning of the ramp func void t15(string ai_name) { ai2_lookatme C_L51 ai2_dopath C_L51 patrol_51 ai2_setjobstate C_L51 ai2_makeignoreplayer C_L51 0 sleep 90 ai2_lookatme C_L50 ai2_dopath C_L50 patrol_50 ai2_setjobstate C_L50 ai2_makeignoreplayer C_L50 0 } ### ATRIUM - 6TH FLOOR ### #tv15 - long box along in front of the windows and the entrance of the first room (entry func: t16); I've disabled it #tv58 - long box behind the windows and the entrance of the second room func void t58(string ai_name) { ai2_spawn C_Lbo53 ai2_spawn C_Sbo52 } ### ATRIUM - 5TH FLOOR ### #tv16 - in the first room around C_N55 func void t17(string ai_name) { ai2_makeignoreplayer C_N55 0 ai2_spawn C_Sbo56 } #tv17 - long box behind the windows and the entrance of the second room func void t18(string ai_name) { ai2_spawn C_S57 } ### ATRIUM - 4TH FLOOR ### #18 - around the entrance to the room with console 9 func void t19(string ai_name) { ai2_spawn C_S58 ai2_spawn C_S59 } #tv53 - medium volume around console 9 (no funcs); I've disabled it #tv52 - in front of console 9 func void t53(string ai_name) { trigvolume_enable trigger_volume_53 0 check_consoles } #console 9 func void powersub3(string ai_name) { var_counter3 = var_counter3 + 10 particle spine3 do stop particle spinesound3 stop if(var_counter3 eq 10 or var_counter3 eq 110) target_set 587 30 if(var_counter3 eq 11) target_set 595 30 if(var_counter3 eq 111) power_off } ### ATRIUM - 3RD FLOOR ### #neutral func of C_N60 func void t20(string ai_name) { ai2_spawn C_Lbo62 ai2_spawn C_Sbo61 } #tv51 - medium volume around console 8 (no funcs); I've disabled it #tv50 - in front of console 8 func void t50(string ai_name) { trigvolume_enable trigger_volume_50 0 check_consoles } func void check_consoles(void) { var_counter2 = var_counter2 + 1 if(var_counter2 eq 1) sound_dialog_play c14_54_25konoko if(var_counter2 eq 2) sound_dialog_play c14_54_26konoko if(var_counter2 eq 3) sound_dialog_play c14_54_27konoko } #console 8 func powersub2(string ai_name) { var_counter3 = var_counter3 + 100 particle spine2 do stop particle spinesound2 do stop if(var_counter3 eq 100 or var_counter3 eq 101) target_set 594 30 if(var_counter3 eq 110) target_set 587 30 if(var_counter3 eq 111) power_off } func void power_off(void) { particle door42_locklight01 do start door_unlock 42 deactivate_sp3 objective_set 3 silent target_set 403 30 music_stop } ### ATRIUM - 2ND FLOOR ### #tv19 - after the entrance to the first room #tv70 - behind the windows of the first room func void t21(string ai_name) { ai2_spawn C_Sbo63 ai2_spawn C_Sbo64 } #tv21 - at the beginning of the stairs down to the ground floor #tv22 - in the free middle of the atrium between the first and second floor; if you fall or jump down, you'll trigger it off func void t23(string ai_name) { ai2_spawn C_L71 ai2_spawn C_S72 } #tv20 - long box behind the windows and the entrance of the second room func void t22(string ai_name) { ai2_makeignoreplayer C_C65 0 } ### ATRIUM - 1ST FLOOR ### #nothing ### ATRIUM - GROUND FLOOR ### #nothing ########## ### SP4 ### ########## #tv43 - after door 42 func void s4(string ai_name) { if(save_point eq 4) objective_set 3 silent else { fork remove_ai save_game 4 autosave var_counter = 0 var_counter2 = 0 var_counter3 = 0 } ai2_spawn C_N74 target_set 596 30 sleep 90 } #tv36 - at the same place as tv43 (entry func: t41); I've disabled it ### ENTRANCE HALL - 3RD FLOOR ### #tv23 - after door 41 func void t25(string ai_name) { ai2_spawn D_C70 ai2_spawn D_Sbo71 ai2_spawn D_Sbo72 ai2_spawn D_Sbo73 ai2_spawn D_Sbo75 ai2_spawn D_N76 } #tv33 - after door 46 (entry func: t37); I've disabled it #console 7 func void floor4_lock(string ai_name) { trigvolume_enable trigger_volume_39 1 particle floor4_lock_locklight01 do start particle stair_lock_locklight01 do start } #tv24 - in the passage to the room with the neutral, who gives you a Scramble Cannon (w7_scc) func void t26(string ai_name) { ai2_spawn D_L74 ai2_spawn new_1 } #neutral func of new_1 func void attack_konoko(string ai_name) { ai2_attack D_L74 A_player } #tv35 - in front of door 28 func void t39(string ai_name) { target_set 598 30 } ### ENTRANCE HALL - 2ND FLOOR ### #tv47 - after the end of the stairs to the second floor func void t48(string ai_name) { ai2_spawn D_L91 ai2_spawn D_S90 ai2_spawn D_S89 ai2_spawn D_S101 ai2_spawn D_C100 ai2_spawn D_Sbo75 ai2_spawn D_Sbo92 } #tv31 - after door 24 (entry func: t34); I've disabled it #tv40 - on the footbridge (entry func: t44); I've disabled it #console 2 func void lastdoor3(string ai_name) { particle lastdoor3_locklight01 do start var_counter = var_counter + 1 if(var_counter eq 1 or var_counter eq 101) target_set 599 30 if(var_counter eq 11) target_set 597 30 if(var_counter eq 111) lastdoor_open } ### ENTRANCE HALL - 1ST FLOOR ### #tv29 - after door 20 func void t31(string ai_name) { t32 } #tv30 - on the footbridge func void t32(string ai_name) { ai2_spawn D_S83 ai2_spawn D_S87 ai2_spawn D_L84 ai2_spawn D_L88 ai2_spawn D_Lbo85 ai2_spawn D_Sbo86 trigvolume_enable trigger_volume_31 0 trigvolume_enable trigger_volume_32 0 } #console 13 func void lastdoor2(string ai_name) { particle lastdoor2_locklight01 do start var_counter = var_counter + 10 if(var_counter eq 10 or var_counter eq 110) target_set 598 30 if(var_counter eq 11) target_set 597 30 if(var_counter eq 111) lastdoor_open } ### ENTRANCE HALL - GROUND FLOOR ### #tv28 - after door 37 func void t30(string ai_name) { ai2_spawn D_L80 } #tv26 - after door 32 (inside the room) func void t28(string ai_name) { ai2_spawn D_S78 ai2_spawn D_S79 } #console 11 func void lastdoor1(string ai_name) { particle lastdoor1_locklight01 do start var_counter = var_counter + 100 if(var_counter eq 100 or var_counter eq 101) target_set 599 30 if (var_counter eq 110) target_set 598 30 if(var_counter eq 111) lastdoor_open } func void lastdoor_open(void) { trigvolume_enable trigger_volume_29 1 particle ZomShin_door_locklight01 do start door_unlock 97 set_objective_4 target_set 401 30 } #tv27 - after door 32 (outside of the room) func void t29(string ai_name) { ai2_spawn D_Lbo81 ai2_spawn D_S82 } #tv 41 - on the platform between the stairs to the torture chamber (entry func: t33); I've disabled it #tv10 - in front of door 16 func void t9(string ai_name) { fork remove_ai particle lastdoor1_locklight01 do stop particle lastdoor2_locklight01 do stop particle lastdoor3_locklight01 do stop door_lock 97 target_set 1 0 spawn_griffin } func void spawn_griffin(void) { particle zombiesteam start env_show 171 1 env_show 172 1 env_show 173 1 env_show 174 1 ai2_spawn ZomGrif ai2_passive ZomGrif 1 chr_inv_reset ZomGrif ai2_setmovementmode ZomGrif walk playback ZomGrif ZomGrifDraw fork check_health } ########## ### SP5 ### ########## #tv45 - in some distance after door 16 func void t42(string ai_name) { if(save_point eq 5) { spawn_griffin set_objective_4 target_set 1 0 } else { save_game 5 autosave door_lock 16 } particle ZomShin_door_locklight01 do stop sleep 1 sound_ambient_start zomshin_amb_loop 1.0 sound_music_start mus_sv 0.75 } #tv55 - in front of console 402 (entry func: t55); I've disabled it #tv64 - in front of the sector with console 402 (entry func: shinzom_voice3); I've disabled it #tv56 - in front of console 401 (entry func: t56); I've disabled it #tv63 - on the right next to console 401; Iguess, they've forgot to rotate it (entry func: shinzom_voice2); I've disabled it #tv56 - in front of console 400 (entry func: t57); I've disabled it #tv62 - in front of the sector with console 400 (entry func: shinzom_voice1); I've disabled it #tv54 - in front of console 399 (entry func: t52); I've disabled it #tv65 - in front of the sector with console 399 (entry func: shinzom_voice4); I've disabled it func void check_health(void) { chr_set_health ZomGrif 100 chr_wait_health ZomGrif 99 trigvolume_enable trigger_volume_35 1 ui_suppress_prompt = 0 objective_set 5 chr_set_health ZomGrif 100 chr_wait_health ZomGrif 99 chr_set_health ZomGrif 250 ai2_passive ZomGrif 0 ai2_attack ZomGrif A_player } #tv32 - in front of the room, where Griffin waits func void t35(string ai_name) { killed_griffen 0 fade_out 0 0 0 30 sleep 30 win } #lose func of ZomGrif func void grifdies(string ai_name) { killed_griffen 1 fade_out 0 0 0 30 sleep 30 win } ##################### ### TEXT CONSOLES ### ##################### func void console1(string ai_name) { text_console level_18c console_reset 14 console_activate 14 } func void console2(string ai_name) { text_console level_18d console_reset 15 } func void console_android(void) { text_console level_18b console_reset 16 } func void console_zombie(void) { text_console level_18a console_reset 17 } func void level_18e(string ai_name) { text_console level_18e console_reset 1 console_activate 1 }