// \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ // ||||||||||||||||||||[ PRAETORIA: MISSION TWO ]||||||||||||||||||||||||||||||||||| // ///////////////////////////////////////////////////////////////////////////////////////////// // praetoria_m2.script (Best viewing for this text document is 1280x1024.) // Author: Diego (Initial script created using EB's prefab script). // (Tank Upgrade and AT Gun scripting by Diego) // (Initial Churchill Tank scripting from Chruker's tank tutorial. Modifed, reorganized and annotated by Diego) // (Steal Objective Scripting By Splashdamage from the map Goldrush.) // (Spawn Exchange scripting - Xenon) // (Warmup script fix - Qualmi) // (See the readme file for any additional credits) // // Changes/fixes: // 1.11: NQ mod dev team - typo in trigger usage of 'obstacle_000_removed' // \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ // ||||||||||||||||||||[ OBJECTIVES INFO ]||||||||||||||||||||||||||||||||||| // ///////////////////////////////////////////////////////////////////////////////////////////// // Allied Objectives // Primaries: // 1: Use the Tank to breach the Depot Gates. // 2: Reinforce the Tank and the Tank Repair Depot. // 3: Steal the Fuel for the Tank. // 4: Escape through the Tunnel that leads to the Airfield. // Secondaries: // 5: Destroy the Side Entrance. // 6: Destroy the Side Wall. // 7: Destroy the Gun Controls. // 8: Build a Command Post. // Axis Objectives // Primaries: // 1: Stop the Allies from breaching the Depot Gates. // 2: Don't let the Allies reinforce the Tank at the Repair Depot. // 3: Protect the Fuel. // 4: Stop the Tank from reaching the Airfield Tunnel // Secondaries: // 5: Defend the Side Entrance. // 6: Protect the Side Wall. // 7: Protect the Gun Controls // 8: Build a Command Post. // Spawns on Praetoria: Hell On Wheels // Main Bunker (Allied Only) // Forward Bunker (Capturable) // Main Entrance (Axis Only) // Global Accums in Use: // globalaccum 0 = Gun Controls State // globalaccum 1 = Fire Countdown State // \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ // ||||||||||||||||||||[ MAIN SCRIPT ]||||||||||||||||||||||||||||||||||| // ///////////////////////////////////////////////////////////////////////////////////////////// game_manager { spawn { //==================================================================================== //ACCUM SETTINGS //==================================================================================== accum 1 set 0 //Allied Objectives completed accum 2 set 0 //Axis Objectives completed //==================================================================================== //==================================================================================== //GAME RULES //==================================================================================== wm_axis_respawntime 20 //20 wm_allied_respawntime 15 //15 wm_number_of_objectives 8 //Should match number of objectives in OBJDATA file. wm_set_round_timelimit 30 //Time Limit wm_set_defending_team 0 //Stopwatch mode defending team (0=Axis, 1=Allies) wm_setwinner 0 //Winner on expiration of round timer (0=Axis, 1=Allies) //==================================================================================== //TEMPORARY CHARGE TIMES FOR TESTING //==================================================================================== // setchargetimefactor 0 soldier 0 // setchargetimefactor 0 medic 0 // setchargetimefactor 0 engineer 0 // setchargetimefactor 0 fieldops 0 // setchargetimefactor 0 covertops 0 // setchargetimefactor 1 soldier 0 // setchargetimefactor 1 medic 0 // setchargetimefactor 1 engineer 0 // setchargetimefactor 1 fieldops 0 // setchargetimefactor 1 covertops 0 //==================================================================================== //==================================================================================== //OBJECTIVES //==================================================================================== // Objective overview status indicators // wm_objective_status wm_objective_status 1 1 0 //Breach the Depot Defenses with the Tank wm_objective_status 1 0 0 wm_objective_status 2 1 0 //Reinforce the tank. wm_objective_status 2 0 0 wm_objective_status 3 1 0 //Steal the Fuel. wm_objective_status 3 0 0 wm_objective_status 4 1 0 //Escape to the Tunnel Exit. wm_objective_status 4 0 0 wm_objective_status 5 1 0 //Destroy Side Entrance. wm_objective_status 5 0 0 wm_objective_status 6 1 0 //Destroy Side Wall. wm_objective_status 6 0 0 wm_objective_status 7 1 2 //Protect the Gun Controls wm_objective_status 7 0 1 wm_objective_status 8 1 0 //Build a CP. wm_objective_status 8 0 0 //==================================================================================== wait 150 //==================================================================================== //REMAP SHADERS //==================================================================================== //Shader remaping for the Churchill Tank for temperate climate remapshader "models/mapobjects/tanks_sd/mg42turret" "models/praetoria/ch_tank/mgturret" remapshaderflush //==================================================================================== //==================================================================================== //AUTO SPAWN (0 = AXIS, 1 = ALLIES) //==================================================================================== setautospawn "Forward Bunker" 0 setautospawn "Forward Bunker" 1 //==================================================================================== wait 2000 //==================================================================================== //STARTING ENTITY SETUP //==================================================================================== trigger tank1 obstacle_000_added //AT Gun Obstacle to force tank to alter route. trigger tank1 obstacle_001_added //Repair Depot Doors are lowered. Tank Can't move past. //==================================================================================== trigger self intro } trigger intro { abortifwarmup wm_announce "^2Version 1.1!" //Script version wait 500 //==================================================================================== //STARTING VOICE COMMANDS //==================================================================================== // *---------------------------------------------------------------------------------* togglespeaker start wait 1000 wm_teamvoiceannounce 0 "axis_tank_stop1" wm_teamvoiceannounce 1 "allies_tank_esc1" wm_teamvoiceannounce 0 "axis_hq_compost_construct" wm_teamvoiceannounce 1 "allies_hq_compost_construct" wm_addteamvoiceannounce 0 "axis_tank_stop1" wm_addteamvoiceannounce 1 "allies_tank_esc1" wm_addteamvoiceannounce 0 "axis_hq_compost_construct" wm_addteamvoiceannounce 1 "allies_hq_compost_construct" // *---------------------------------------------------------------------------------* //==================================================================================== } //======================================================================================= // ||||||||||||||||||||[ AT_GUN FIRING ABILITY ]|||||||||||||||||||||||||||||||||| //======================================================================================= trigger fire_countdown { globalaccum 0 abort_if_not_bitset 1 wm_announce "^1WARNING: ^3Operational Tank Detected!!" globalaccum 1 abort_if_not_equal 1 wait 200 globalaccum 1 abort_if_not_equal 1 wait 200 globalaccum 1 abort_if_not_equal 1 wait 200 globalaccum 1 abort_if_not_equal 1 wait 200 globalaccum 1 abort_if_not_equal 1 wait 200 globalaccum 0 abort_if_not_bitset 2 // wm_announce "^1WARNING: ^3Tank is in Range!!" globalaccum 1 abort_if_not_equal 1 wait 200 globalaccum 1 abort_if_not_equal 1 wait 200 globalaccum 1 abort_if_not_equal 1 wait 200 globalaccum 1 abort_if_not_equal 1 wait 200 globalaccum 1 abort_if_not_equal 1 wait 200 globalaccum 0 abort_if_not_bitset 0 // wm_announce "^1WARNING: ^3AT Gun Reloading!!" togglespeaker at_gun_prep globalaccum 1 abort_if_not_equal 1 wait 200 globalaccum 1 abort_if_not_equal 1 wait 200 globalaccum 1 abort_if_not_equal 1 wait 200 globalaccum 1 abort_if_not_equal 1 wait 200 globalaccum 1 abort_if_not_equal 1 wait 200 globalaccum 1 abort_if_not_equal 1 wm_announce "^1WARNING: ^3Fire the AT Gun!!" trigger at_gun_trigger fire_ok } //======================================================================================= // ||||||||||||||||||||[ VICTORY SCRIPTING ]|||||||||||||||||||||||||||||||||||||| //======================================================================================= //ALLIED VICTORY trigger allies_objective_counter //Counts allied objectives completed { accum 1 inc 1 trigger game_manager checkgame_allies } trigger checkgame_allies { accum 1 abort_if_not_equal 1 wm_setwinner 1 wait 1000 wm_endround } //AXIS VICTORY trigger axis_objective_counter //Counts axis objectives completed { accum 2 inc 1 trigger game_manager checkgame_axis } trigger checkgame_axis { accum 2 abort_if_not_equal 1 wm_setwinner 0 wait 2000 togglespeaker tpir wait 4000 wm_endround } //======================================================================================= } // \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ // ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| // ///////////////////////////////////////////////////////////////////////////////////////////// // \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ // ||||||||||||||||[ MISC SCRIPTS ]|||||||||||||||||||||||||||||| // ///////////////////////////////////////////////////////////////////////////////////////////// // Kill zone for players in electrical area or in front of 6 shooter on tank. gibber { trigger humiliate { wm_teamvoiceannounce 0 "humiliation" wm_teamvoiceannounce 1 "humiliation" } } // Manual script tester. //tester //{ // trigger test_run // { // // //trigger >eventname> // wm_announce "Manually running script" // trigger game_manager gun_counter_add // //trigger >eventname> // } //} // \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ // ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| // ///////////////////////////////////////////////////////////////////////////////////////////// // \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ // ||||||||||||||||[ DESTRUCTIBLE OBJECTIVES ]|||||||||||||||||||||||||||||| // ///////////////////////////////////////////////////////////////////////////////////////////// //Side Entrance sidedoor { spawn { wait 200 constructible_class 3 // Dynamite only } death { wm_objective_status 5 1 1 wm_objective_status 5 0 2 //==================================================================================== wm_announce "The Allies have destroyed the Side Entrance!!" // *----------------------------------- vo ------------------------------------------* //==================================================================================== wm_teamvoiceannounce 0 "axis_entrance2_destroyed" wm_teamvoiceannounce 1 "allies_entrance2_destroyed" // *---------------------------------------------------------------------------------* //==================================================================================== //==================================================================================== } } //Side Wall sidewall { spawn { wait 200 constructible_class 3 // Dynamite only } death { wm_objective_status 6 1 1 wm_objective_status 6 0 2 //==================================================================================== wm_announce "The Allies have destroyed the Side Wall!!" // *----------------------------------- vo ------------------------------------------* //==================================================================================== wm_teamvoiceannounce 0 "axis_sidewall_destroyed" wm_teamvoiceannounce 1 "allies_sidewall_breached" // *---------------------------------------------------------------------------------* //==================================================================================== } } //Six Shooter Targets gate_north { spawn { wait 200 } } gate_south { spawn { wait 200 } } wall_north { spawn { wait 200 } } wall_south { spawn { wait 200 } } roof_north { spawn { wait 200 } } roof_south { spawn { wait 200 } } // \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ // ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| // ///////////////////////////////////////////////////////////////////////////////////////////// // \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ // ||||||||||||||||||||[ STEAL FUEL OBJECTIVES ]|||||||||||||||||||||||||||||||||| // ///////////////////////////////////////////////////////////////////////////////////////////// //Fuel Dropoff TOI Entity fueltank_dropoff { death { trigger tank1 add_fueltank } } //Fuel Pickup Entity fuel_tank { spawn { accum 0 set 0 // gold counter } trigger stolen { accum 0 inc 1 accum 0 trigger_if_equal 1 fuel_tank stolen1 accum 0 trigger_if_equal 2 fuel_tank stolen2 } trigger secured { accum 0 trigger_if_equal 1 fuel_tank secured1 accum 0 trigger_if_equal 2 fuel_tank secured2 } trigger returned { accum 0 inc -1 accum 0 trigger_if_equal 0 fuel_tank returned1 accum 0 trigger_if_equal 1 fuel_tank returned2 } trigger stolen1 { // *----------------------------------- vo ------------------------------------------* wm_teamvoiceannounce 0 "axis_fuel1_taken" wm_teamvoiceannounce 1 "allies_fuel1_taken" // *----------------------------------- vo ------------------------------------------* } trigger stolen2 { // *----------------------------------- vo ------------------------------------------* wm_teamvoiceannounce 0 "axis_fuel2_taken" wm_teamvoiceannounce 1 "allies_fuel2_taken" // *----------------------------------- vo ------------------------------------------* } trigger secured1 { wm_announce "Allied team has secured the first Fuel Tank!" // *----------------------------------- vo ------------------------------------------* wm_teamvoiceannounce 0 "axis_fuel1_secured" wm_teamvoiceannounce 1 "allies_fuel1_secured" // *---------------------------------------------------------------------------------* } trigger secured2 { wm_announce "Allied team has secured the second Fuel Tank!" // *----------------------------------- vo ------------------------------------------* wm_teamvoiceannounce 0 "axis_fuel2_secured" wm_teamvoiceannounce 1 "allies_fuel2_secured" wm_removeteamvoiceannounce 0 "axis_fuel_defend" wm_removeteamvoiceannounce 1 "allies_fuel_get" // *---------------------------------------------------------------------------------* } trigger returned1 { // *----------------------------------- vo ------------------------------------------* wm_teamvoiceannounce 0 "axis_fuel1_returned" wm_teamvoiceannounce 1 "allies_fuel1_returned" // *----------------------------------- vo ------------------------------------------* } trigger returned2 { // *----------------------------------- vo ------------------------------------------* wm_teamvoiceannounce 0 "axis_fuel2_returned" wm_teamvoiceannounce 1 "allies_fuel2_returned" // *----------------------------------- vo ------------------------------------------* } } // \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ // ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| // ///////////////////////////////////////////////////////////////////////////////////////////// // \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ // ||||||||||||||||[ ANTI TANK GUN ]||||||||||||||||||||||||||||||||||| // ///////////////////////////////////////////////////////////////////////////////////////////// // ================================================ // AT GUN Entities // ================================================ //AT gun Script Mover at_gun { spawn { wait 10 gotomarker gun_loc 50000 faceangles 0 350 0 5000 accum 2 set 0 //Which flash and effects 0= right 1= left } trigger face_right { stopsound playsound sound/movers/motors/motor_start_01.wav volume 512 stopsound playsound sound/movers/motors/motor_loop_01.wav looping volume 512 faceangles 0 275 0 2000 stopsound playsound sound/movers/motors/motor_end_01.wav 512 } trigger face_left { stopsound playsound sound/movers/motors/motor_start_01.wav volume 512 stopsound playsound sound/movers/motors/motor_loop_01.wav looping volume 512 faceangles 0 350 0 2000 stopsound playsound sound/movers/motors/motor_end_01.wav 521 } trigger flash_check { accum 2 trigger_if_equal 0 at_gun flash_right accum 2 trigger_if_equal 1 at_gun flash_left } trigger flash_right { setstate at_gun_flash default togglespeaker at_gun_fire alertentity at_gun_fx wait 100 setstate at_gun_flash invisible } trigger flash_left { setstate at_gun_flash2 default togglespeaker at_gun_fire alertentity at_gun_fx2 wait 100 setstate at_gun_flash2 invisible } trigger flash_switch { accum 2 set 1 trigger at_gun face_left } } //AT gun Muzzle Flashes at_gun_flash { spawn { wait 1000 // attachtotag at_gun tag_flash setstate at_gun_flash invisible } } at_gun_flash2 { spawn { wait 1000 // attachtotag at_gun tag_flash setstate at_gun_flash2 invisible } } //AT gun Muzzle Effects at_gun_fx { spawn { wait 1000 // attachtotag at_gun tag_flash } } at_gun_fx2 { spawn { wait 1000 // attachtotag at_gun tag_flash } } // ================================================ // AT GUN Auto Fire // ================================================ autofire_trigger { spawn { accum 1 set 0 } trigger run { accum 1 abort_if_equal 1 accum 1 set 1 togglespeaker autofire_alarm trigger at_gun face_right wait 3000 togglespeaker at_gun_on wait 150 trigger at_gun flash_check trigger at_gun_target damagecheck accum 1 set 0 } trigger miss { accum 1 abort_if_equal 1 accum 1 set 1 togglespeaker autofire_alarm wait 3000 togglespeaker at_gun_on wait 150 trigger at_gun flash_check trigger at_gun_target missed accum 1 set 0 } trigger break { accum 1 abort_if_equal 1 accum 1 set 1 togglespeaker autofire_alarm wait 3000 togglespeaker at_gun_break wait 200 togglespeaker at_gun_off wm_announce "^1WARNING: ^3Auto Fire Jammed! Switching to Manual Fire!!!" trigger gun_display_type manual trigger vo_manager fire_stop togglespeaker at_switch_on accum 1 set 0 } trigger destroyed { accum 1 abort_if_equal 1 accum 1 set 1 togglespeaker at_switch_on accum 1 set 0 } } // ================================================ // AT GUN Manual Fire // ================================================ // Slot Used for // ==== ======== // Global Accum 0 Gun Controls State: // - Bit 0: Gun Controls ok 0 = No 1 = Yes // - Bit 1: Tank Alive 0 = No 1 = Yes // - Bit 2: Tank In Range 0 = No 1 = Yes // Global Accum 1 Gun Controls Fire Countdown 0 = No 1 = Yes at_gun_trigger { spawn { wait 200 globalaccum 0 bitset 0 globalaccum 0 bitset 1 globalaccum 0 bitreset 2 globalaccum 1 set 0 //Gun Countdown Ready setstate at_gun_trigger invisible //Trigger Turned OFF } trigger status_check { globalaccum 0 abort_if_not_bitset 0 //wm_announce "status controls ok" globalaccum 0 abort_if_not_bitset 1 // wm_announce "status tank ok" globalaccum 0 abort_if_not_bitset 2 // wm_announce "status range ok" globalaccum 1 set 1 //ready to fire trigger game_manager fire_countdown } trigger revive { globalaccum 0 bitset 0 // - Bit 0: Gun Controls ok 0 = No 1 = Yes trigger at_gun_trigger status_check } trigger disabled { globalaccum 0 bitreset 0 // - Bit 0: Gun Controls ok 0 = No 1 = Yes globalaccum 1 trigger_if_equal 1 at_gun_trigger fire_dead //If Gun was ready to fire, switch off the fire ready state } trigger range_ok { //wm_announce "range_ok" globalaccum 0 bitset 2 // - Bit 2: Tank In Range 0 = No 1 = Yes trigger gun_display_range on trigger at_gun_trigger status_check } trigger range_bad { //wm_announce "range_bad" globalaccum 0 bitreset 2 // - Bit 2: Tank In Range 0 = No 1 = Yes globalaccum 1 trigger_if_equal 1 at_gun_trigger fire_bad //If Gun was ready to fire, switch off the fire ready state trigger gun_display_range off } trigger tank_ok { //wm_announce "tank_ok" globalaccum 0 bitset 1 // - Bit 1: Tank Alive 0 = No 1 = Yes trigger gun_display_tank on trigger at_gun_trigger status_check } trigger tank_bad { //wm_announce "tank_bad" globalaccum 0 bitreset 1 // - Bit 1: Tank Alive 0 = No 1 = Yes globalaccum 1 trigger_if_equal 1 at_gun_trigger fire_bad //If Gun was ready to fire, switch off the fire ready state trigger gun_display_tank off } trigger fire_ok { //wm_announce "fire ok" trigger g_con fire_on //Console Set to Fire setstate at_gun_trigger default //Trigger Turned On trigger vo_manager fire_gun_vo } trigger fire_bad { //wm_announce "fire bad" globalaccum 1 set 0 //Not Ready to Fire trigger g_con fire_off //Console not Set to Fire setstate at_gun_trigger invisible //Trigger Turned On } trigger fire_dead { // wm_announce "fire dead" globalaccum 1 set 0 //Not Ready to Fire trigger g_con fire_dead //Console not Set to Fire setstate at_gun_trigger invisible //Trigger Turned On } activate axis { globalaccum 1 abort_if_not_equal 1 trigger self fire } activate allies { togglespeaker at_switch_failed } trigger fire { wm_announce "^1WARNING: ^3AT Gun has been Fired Manually!!" //Warning message //switch sound togglespeaker at_gun_on togglespeaker at_switch_on wait 150 trigger at_gun flash_check //Choose direction and fire trigger at_gun_target damagecheck //Check Tank Damage } } // ================================================ // AT GUN TARGET // ================================================ //Accum 2: Tank Armour Status 0 = Start 1 = 100% 2 = 75% 3 = 50% 4 = 25% 5 = 0% at_gun_target { spawn { // Wait for host entity to spawn wait 200 accum 1 set 0 //script busy accum 2 set 0 //Front Armour status accum 3 set 0 //Switch Sides } trigger missed { alertentity wall_rock alertentity at_gun_miss } trigger switch_armour { accum 3 set 1 accum 2 inc 1 } trigger armour_inc_front { accum 2 inc 1 } trigger armour_inc_back { accum 2 inc 2 } trigger damagecheck { accum 1 abort_if_equal 1 accum 2 trigger_if_equal 0 at_gun_target damage_XX accum 2 trigger_if_equal 1 at_gun_target damage_90 accum 2 trigger_if_equal 2 at_gun_target damage_80 accum 2 trigger_if_equal 3 at_gun_target damage_70 accum 2 trigger_if_equal 4 at_gun_target damage_60 accum 2 trigger_if_equal 5 at_gun_target damage_50 accum 2 trigger_if_equal 6 at_gun_target damage_40 accum 2 trigger_if_equal 7 at_gun_target damage_30 accum 2 trigger_if_equal 8 at_gun_target damage_20 accum 2 trigger_if_equal 9 at_gun_target damage_10 accum 2 trigger_if_equal 10 at_gun_target damage_00 accum 2 trigger_if_equal 11 at_gun_target damage_end accum 2 trigger_if_equal 12 at_gun_target damage_end } trigger upgrade { wait 100 trigger vo_manager tank_reinforced accum 2 set 1 accum 4 set 2 } //---------------------------------------------------------------------- // TURRET DAMAGED STAGES //---------------------------------------------------------------------- //Auto fire damage setup trigger damage_XX { accum 1 abort_if_equal 1 accum 1 set 1 remapshader "models/praetoria/ch_tank/body" "models/praetoria/ch_tank/body_d" remapshaderflush alertentity tank1_fx alertentity tank1_fx alertentity tank1_fx alertentity tank1_fx alertentity tank1_explo alertentity tank1_smoke2 setstate tank1_fire default setstate tank1_firehurt default wait 500 // accum 2 set 5 //should be 5 by default 1 for testing all firing sequences trigger tank1 move_detour trigger vo_manager tank_esc_repdep_vo accum 1 set 0 } trigger damage_90 { accum 1 abort_if_equal 1 accum 1 set 1 wm_announce "^1Warning: ^2Tank Armour at 90 percent effectiveness!" alertentity tank1_fx alertentity tank1_fx alertentity tank1_fx alertentity tank1_fx alertentity tank1_explo wait 500 accum 3 trigger_if_equal 0 at_gun_target armour_inc_front accum 3 trigger_if_equal 1 at_gun_target armour_inc_back accum 1 set 0 } trigger damage_80 { accum 1 abort_if_equal 1 accum 1 set 1 togglespeaker manfire_alarm wm_announce "^1Warning: ^2Tank Armour at 80 percent effectiveness!" alertentity tank1_fx alertentity tank1_fx alertentity tank1_fx alertentity tank1_fx alertentity tank1_explo wait 500 accum 3 trigger_if_equal 0 at_gun_target armour_inc_front accum 3 trigger_if_equal 1 at_gun_target armour_inc_back accum 1 set 0 } trigger damage_70 { accum 1 abort_if_equal 1 accum 1 set 1 wm_announce "^1Warning: ^2Tank Armour at 70 percent effectiveness!" alertentity tank1_fx alertentity tank1_fx alertentity tank1_fx alertentity tank1_fx alertentity tank1_explo wait 500 accum 3 trigger_if_equal 0 at_gun_target armour_inc_front accum 3 trigger_if_equal 1 at_gun_target armour_inc_back accum 1 set 0 } trigger damage_60 { accum 1 abort_if_equal 1 accum 1 set 1 wm_announce "^1Warning: ^2Tank Armour at 60 percent effectiveness!" alertentity tank1_fx alertentity tank1_fx alertentity tank1_fx alertentity tank1_fx alertentity tank1_explo wait 500 accum 3 trigger_if_equal 0 at_gun_target armour_inc_front accum 3 trigger_if_equal 1 at_gun_target armour_inc_back accum 1 set 0 } trigger damage_50 { accum 1 abort_if_equal 1 accum 1 set 1 wm_announce "^1Warning: ^3Tank Armour at 50 percent effectiveness!" alertentity tank1_fx alertentity tank1_fx alertentity tank1_fx alertentity tank1_fx alertentity tank1_explo wait 500 accum 3 trigger_if_equal 0 at_gun_target armour_inc_front accum 3 trigger_if_equal 1 at_gun_target armour_inc_back accum 1 set 0 } trigger damage_40 { accum 1 abort_if_equal 1 accum 1 set 1 togglespeaker manfire_alarm wm_announce "^1Warning: ^3Tank Armour at 40 percent effectiveness!" alertentity tank1_fx alertentity tank1_fx alertentity tank1_fx alertentity tank1_fx alertentity tank1_explo wait 500 accum 3 trigger_if_equal 0 at_gun_target armour_inc_front accum 3 trigger_if_equal 1 at_gun_target armour_inc_back accum 1 set 0 } trigger damage_30 { accum 1 abort_if_equal 1 accum 1 set 1 togglespeaker manfire_alarm wm_announce "^1Warning: ^3Tank Armour at 30 percent effectiveness!" alertentity tank1_fx alertentity tank1_fx alertentity tank1_fx alertentity tank1_fx alertentity tank1_explo wait 500 accum 3 trigger_if_equal 0 at_gun_target armour_inc_front accum 3 trigger_if_equal 1 at_gun_target armour_inc_back accum 1 set 0 } trigger damage_20 { accum 1 abort_if_equal 1 accum 1 set 1 togglespeaker manfire_alarm wm_announce "^1Warning: ^3Tank Armour at 20 percent effectiveness!" alertentity tank1_fx alertentity tank1_fx alertentity tank1_fx alertentity tank1_fx alertentity tank1_explo wait 500 accum 3 trigger_if_equal 0 at_gun_target armour_inc_front accum 3 trigger_if_equal 1 at_gun_target armour_inc_back accum 1 set 0 } trigger damage_10 { accum 1 abort_if_equal 1 accum 1 set 1 togglespeaker manfire_alarm remapshader "models/mapobjects/tanks_sd/mg42turret" "models/praetoria/ch_tank/mgturret" remapshader "models/praetoria/ch_tank/body" "models/praetoria/ch_tank/body" remapshaderflush wm_announce "^1Warning: ^1Tank Armour at 10 percent effectiveness!" wm_announce "^1One more hit to the Rear Armour and the tank will be destroyed!!!" alertentity tank1_fx alertentity tank1_fx alertentity tank1_fx alertentity tank1_fx alertentity tank1_explo wait 500 accum 3 trigger_if_equal 0 at_gun_target armour_inc_front accum 3 trigger_if_equal 1 at_gun_target armour_inc_back accum 1 set 0 } trigger damage_00 { accum 1 abort_if_equal 1 accum 1 set 1 togglespeaker manfire_alarm remapshader "models/mapobjects/tanks_sd/mg42turret" "models/praetoria/ch_tank/mgturret" remapshader "models/praetoria/ch_tank/body" "models/praetoria/ch_tank/body" remapshaderflush wm_announce "^1Warning: ^1Tank Armour has been compromised!" wm_announce "^1One more hit and the tank will be destroyed!!!" alertentity tank1_fx alertentity tank1_fx alertentity tank1_fx alertentity tank1_fx alertentity tank1_explo wait 500 accum 3 trigger_if_equal 0 at_gun_target armour_inc_front accum 3 trigger_if_equal 1 at_gun_target armour_inc_back accum 1 set 0 } trigger damage_end { accum 1 abort_if_equal 1 accum 1 set 1 togglespeaker manfire_alarm wm_announce "^1MISSION FAILED: ^1The Tank has been destroyed!!!!" trigger vo_manager tank_killed_vo alertentity tank1_fx alertentity tank1_fx alertentity tank1_fx alertentity tank1_fx alertentity tank1_explo alertentity tank1_smoke2 setstate tank1_fire default setstate tank1_firehurt default remapshader "models/praetoria/ch_tank/mgturret" "textures/praetoria_m2/alpha/embers" remapshader "models/praetoria/ch_tank/body" "textures/praetoria_m2/alpha/embers" remapshaderflush trigger tank1 script_lock trigger at_gun_trigger disabled wait 500 trigger game_manager axis_objective_counter accum 1 set 0 } } // \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ // ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| // ///////////////////////////////////////////////////////////////////////////////////////////// // \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ // ||||||||||||||||[ CONTRUCTABLE OBJECTIVES ]|||||||||||||||||||||||||||||| // ///////////////////////////////////////////////////////////////////////////////////////////// // ================================================ // AT Gun Controls // ================================================ //============================================================================= //=== g_con Mapscript //============================================================================= g_con_smoke { spawn { wait 300 setstate g_con_smoke invisible } } // sound "thread" g_con_engine { spawn { accum 1 set 1 wait 200 trigger g_con_engine sound_idle } trigger sound_alarm_on { accum 1 set 0 enablespeaker manfire_alarm trigger self sound_alarm_loop } trigger sound_alarm_loop { accum 1 abort_if_equal 1 togglespeaker manfire_alarm wait 525 trigger self sound_alarm_loop } trigger sound_alarm_off { accum 1 set 1 //togglespeaker manfire_alarm disablespeaker manfire_alarm } trigger sound_rebirth { playsound sound/praetoria_m2/mech_rebirth.wav volume 128 trigger self sound_idle } trigger sound_idle { playsound sound/praetoria_m2/idle_alarm.wav looping volume 256 } trigger sound_pain { playsound sound/praetoria_m2/mech_pain.wav volume 256 } trigger sound_death { stopsound playsound sound/praetoria_m2/mech_death.wav volume 128 } // ======================================== } g_con_toi { spawn { wait 500 followspline 0 path_00 10000 wait length -64 } } g_con_construct { spawn { wait 100 constructible_class 3 // constructible_health 300 // constructible_chargebarreq 1.5 // constructible_constructxpbonus 10 // constructible_destructxpbonus 10 followspline 0 path_00 10000 wait length -64 } built final { alertentity g_con trigger g_con_engine sound_rebirth } } // script_mover //============================================================================= // accum 0, script lock // accum 1, current movement path position // accum 2, track state // accum 3, bit 0 death status (0=dead, 1=alive) // bit 4 temp register // bit 5 message-flag (0=no message, 1=message) // bit 6 visible state (0=alive, 1=dead) // accum 4, stop counter // g_con { spawn { wait 50 // constructible_chargebarreq 1.0 // constructible_constructxpbonus 10 // constructible_destructxpbonus 10 followspline 0 path_00 10000 wait length -64 } // ======================================== trigger script_lock { accum 0 inc 1 } trigger script_unlock { accum 0 inc -1 } trigger g_con_enable { accum 0 abort_if_not_equal 0 // are we not in a script lockout? accum 3 abort_if_bitset 0 // death check } trigger g_con_disable { trigger self deathcheck } trigger deathcheck { accum 3 abort_if_not_bitset 0 // are we dead? accum 3 abort_if_bitset 6 // are we not already visibly dead? accum 0 abort_if_not_equal 0 // are we not in a script lockout? accum 3 bitset 6 // we're now visibly dead accum 3 bitset 5 kill g_con_construct //Alert Constructable it is dead //==================================================================================== changemodel models/praetoria/consoles/at_con_dead.md3 //Dead Model trigger g_con_engine sound_death //Death Sound alertentity g_con_debris //Activate debris entity alertentity g_con_smoke //activate smoke entity //==================================================================================== trigger at_gun_trigger disabled //Turn off Trigger //==================================================================================== wm_announce "^1WARNING: ^3Manual Fire Control Damaged!!!" //warning message // *----------------------------------- vo ------------------------------------------* trigger vo_manager g_con_damaged_vo //Alert Players with VO //==================================================================================== wm_objective_status 7 1 1 //Controls destroyed wm_objective_status 7 0 2 resetscript } rebirth { accum 3 bitreset 6 // we're visibly alive accum 3 bitreset 0 // we're alive again //==================================================================================== alertentity g_con_smoke //turn off smoke //==================================================================================== trigger at_gun_trigger revive //Tell trigger you are rebuilt //==================================================================================== changemodel models/praetoria/consoles/at_con_load.md3 //Fixed Model trigger g_con_engine sound_rebirth //Sound power on //==================================================================================== //==================================================================================== wm_announce "^1WARNING: ^3Manual Fire Control Restored!!!" //warning message // *----------------------------------- vo ------------------------------------------* trigger vo_manager g_con_built_vo //Alert players with VO //==================================================================================== wm_objective_status 7 1 2 //Controls Rebuilt wm_objective_status 7 0 1 } pain { trigger g_con_engine sound_pain } death { accum 3 bitset 0 } trigger on { // wm_announce "gun controls on" changemodel models/praetoria/consoles/at_con_load.md3 trigger g_con_engine sound_idle } trigger fire_on { // wm_announce "gun controls fire" changemodel models/praetoria/consoles/at_con_fire.md3 trigger g_con_engine sound_alarm_on } trigger fire_off { // wm_announce "gun controls off" changemodel models/praetoria/consoles/at_con_load.md3 trigger g_con_engine sound_alarm_off } trigger fire_dead { // wm_announce "gun controls off" // changemodel models/praetoria/consoles/at_con_load.md3 trigger g_con_engine sound_alarm_off } // trigger dead // { // // wm_announce "gun controls dead" // trigger self sound_death // // trigger g_con_engine sound_alarm_off // } // ======================================== trigger run_continue { accum 1 inc 1 trigger self deathcheck } trigger move_to_0 { trigger self run_continue } } g_con_trigger { spawn { wait 500 } } g_con_disabler { trigger run { trigger g_con g_con_disable } } g_con_enabler { spawn { wait 500 followspline 0 path_00 10000 wait length -64 } trigger run { trigger g_con g_con_enable } } gun_display_type { spawn { wait 10 followspline 0 path_00 10000 wait length -64 } trigger auto { changemodel models/praetoria/displays/at_dis_auto.md3 } trigger manual { changemodel models/praetoria/displays/at_dis_man.md3 } } gun_display_tank { spawn { wait 10 followspline 0 path_00 10000 wait length -64 } trigger on { changemodel models/praetoria/displays/at_dis_t_on.md3 } trigger off { changemodel models/praetoria/displays/at_dis_t_off.md3 } } gun_display_range { spawn { wait 10 followspline 0 path_00 10000 wait length -64 } trigger on { changemodel models/praetoria/displays/at_dis_r_on.md3 } trigger off { changemodel models/praetoria/displays/at_dis_r_off.md3 } } // ================================================ // NEUTRAL COMMAND POST // ================================================ cp_allies_clip { spawn { wait 400 constructible_class 2 trigger self setup } trigger setup { setchargetimefactor 1 soldier 1 setchargetimefactor 1 lieutenant 1 setchargetimefactor 1 medic 1 setchargetimefactor 1 engineer 1 setchargetimefactor 1 covertops 1 sethqstatus 1 0 } buildstart final { trigger cp_model allies_construct } built final { trigger cp_model allies_built trigger cp_model enable_allied_features enablespeaker allies_compost_sound } decayed final { trigger cp_model neutral } death { trigger cp_model neutral trigger cp_model disable_allied_features disablespeaker allies_compost_sound } } cp_axis_clip { spawn { wait 400 constructible_class 2 trigger self setup } trigger setup { setchargetimefactor 0 soldier 1 setchargetimefactor 0 lieutenant 1 setchargetimefactor 0 medic 1 setchargetimefactor 0 engineer 1 setchargetimefactor 0 covertops 1 sethqstatus 0 0 } buildstart final { trigger cp_model axis_construct } built final { trigger cp_model axis_built trigger cp_model enable_axis_features enablespeaker axis_compost_sound } decayed final { trigger cp_model neutral } death { trigger cp_model neutral trigger cp_model disable_axis_features disablespeaker axis_compost_sound } } cp_model { spawn { wait 400 faceangles 0 180 0 5 } trigger axis_construct { changemodel models/praetoria/cp/cp_axis_open.md3 setstate cp_model underconstruction } trigger axis_built { changemodel models/praetoria/cp/cp_axis_open.md3 setstate cp_model default } trigger allies_construct { changemodel models/praetoria/cp/cp_allied_open.md3 setstate cp_model underconstruction } trigger allies_built { changemodel models/praetoria/cp/cp_allied_open.md3 setstate cp_model default } trigger neutral { changemodel models/praetoria/cp/cp_neutral_shut.md3 setstate cp_model default } trigger enable_allied_features { setchargetimefactor 1 soldier 0.75 setchargetimefactor 1 lieutenant 0.75 setchargetimefactor 1 medic 0.75 setchargetimefactor 1 engineer 0.75 setchargetimefactor 1 covertops 0.75 sethqstatus 1 1 wm_announce "Allied Command Post constructed. Forward Spawn Enabled!" // *----------------------------------- vo ------------------------------------------* wm_teamvoiceannounce 0 "axis_hq_compost_constructed_allies" wm_teamvoiceannounce 1 "allies_hq_compost_constructed" wm_removeteamvoiceannounce 1 "allies_hq_compost_construct" // *---------------------------------------------------------------------------------* wm_allied_respawntime 17 togglespeaker alliedhqsound trigger alliedcpspawns_obj on wm_objective_status 8 1 1 //Build a CP. wm_objective_status 8 0 2 } trigger disable_allied_features { setchargetimefactor 1 soldier 1 setchargetimefactor 1 lieutenant 1 setchargetimefactor 1 medic 1 setchargetimefactor 1 engineer 1 setchargetimefactor 1 covertops 1 sethqstatus 1 0 wm_announce "Axis team has destroyed the Allied Command Post!" // *----------------------------------- vo ------------------------------------------* wm_addteamvoiceannounce 0 "axis_hq_compost_construct" wm_addteamvoiceannounce 1 "allies_hq_compost_construct" wm_teamvoiceannounce 0 "axis_hq_compost_construct" wm_teamvoiceannounce 1 "allies_hq_compost_damaged" // *---------------------------------------------------------------------------------* wm_allied_respawntime 15 trigger alliedcpspawns_obj off togglespeaker alliedhqsound wm_objective_status 8 1 0 //Build a CP. wm_objective_status 8 0 0 } trigger enable_axis_features { setchargetimefactor 0 soldier 0.75 setchargetimefactor 0 lieutenant 0.75 setchargetimefactor 0 medic 0.75 setchargetimefactor 0 engineer 0.75 setchargetimefactor 0 covertops 0.75 sethqstatus 0 1 wm_announce "Axis Command Post constructed. Charge speed increased!" // *----------------------------------- vo ------------------------------------------* wm_teamvoiceannounce 0 "axis_hq_compost_constructed" wm_teamvoiceannounce 1 "allies_hq_compost_constructed_axis" wm_removeteamvoiceannounce 0 "axis_hq_compost_construct" // *---------------------------------------------------------------------------------* wm_axis_respawntime 18 togglespeaker axishqsound // trigger axiscpspawns_obj on wm_objective_status 8 1 2 //Build a CP. wm_objective_status 8 0 1 } trigger disable_axis_features { setchargetimefactor 0 soldier 1 setchargetimefactor 0 lieutenant 1 setchargetimefactor 0 medic 1 setchargetimefactor 0 engineer 1 setchargetimefactor 0 covertops 1 sethqstatus 0 0 wm_announce "Allied team has destroyed the Axis Command Post!" // *----------------------------------- vo ------------------------------------------* wm_addteamvoiceannounce 0 "axis_hq_compost_construct" wm_addteamvoiceannounce 1 "allies_hq_compost_construct" wm_teamvoiceannounce 0 "axis_hq_compost_damaged" wm_teamvoiceannounce 1 "allies_hq_compost_construct" // *---------------------------------------------------------------------------------* wm_axis_respawntime 20 //20 togglespeaker axishqsound wm_objective_status 8 1 0 //Build a CP. wm_objective_status 8 0 0 } } alliedcpspawns_obj { spawn { wait 50 setstate alliedcpspawns_obj invisible } trigger on { setstate alliedcpspawns_obj default setstate alliedcpspawns default } trigger off { setstate alliedcpspawns_obj invisible setstate alliedcpspawns invisible } } alliedcpspawns { spawn { wait 50 setstate alliedcpspawns invisible } } // \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ // ||||||||||||||||[ REPAIR DEPOT ]|||||||||||||||||||||||||||| // ///////////////////////////////////////////////////////////////////////////////////////////// // ================================================ // Repair Depot Door and Switch // ================================================ repair_door_zone { spawn { wait 100 } } repair_door_trigger { trigger switch { trigger repair_door switch } } repair_door { spawn { accum 1 set 0 accum 2 set 1 // 0 = doors open 1 = doors closed 2 = doors blocked } trigger switch { accum 1 abort_if_equal 1 accum 2 trigger_if_equal 0 repair_door close accum 2 trigger_if_equal 1 repair_door open accum 2 trigger_if_equal 2 repair_door failed } trigger open { accum 1 abort_if_equal 1 accum 1 set 1 wm_announce "^2The Repair Depot Door has been opened!" trigger repair_door_switch up playsound sound/movers/switches/butn2.wav wait 200 playsound sound/praetoria_m2/north_door.wav gotomarker repair_door_up 35 wait trigger tank1 obstacle_001_removed accum 2 set 0 accum 1 set 0 resetscript } trigger close { accum 1 abort_if_equal 1 accum 1 set 1 trigger tank1 obstacle_001_added wm_announce "^1The Repair Depot Door has been closed!" trigger repair_door_switch down playsound sound/movers/switches/butn2.wav wait 200 playsound sound/praetoria_m2/north_door.wav gotomarker repair_door_dn 35 wait accum 2 set 1 accum 1 set 0 resetscript } trigger failed { accum 1 abort_if_equal 1 accum 1 set 1 wm_announce "^3The Repair Depot Door is Blocked!" playsound sound/movers/switches/switch_01.wav accum 2 set 2 accum 1 set 0 resetscript } trigger disable { accum 2 set 2 setstate repair_door_zone invisible } trigger enable { accum 2 set 0 setstate repair_door_zone default } } repair_door_switch { spawn { } trigger up { gotomarker repair_switch_up 60 wait } trigger down { gotomarker repair_switch_dn 60 wait } } // ================================================ // Tank Repair Lock Switch // ================================================ msg_01_trigger { spawn { wait 100 setstate msg_01_trigger default //Repair Depot Locks are Empty } } msg_02_trigger { spawn { wait 100 setstate msg_02_trigger invisible //Repair Depot Locks are Busy } } repair_lock_trigger { spawn { accum 1 set 0 accum 2 set 3 // 0 = locks unlocked 1 = locks locked 2 = locks disabled 3 = locks empty accum 3 set 0 setstate repair_lock invisible } trigger tank_repaired { accum 3 set 0 printaccum 3 } trigger tank_disabled { accum 3 set 1 printaccum 3 } activate axis { accum 1 abort_if_equal 1 accum 2 trigger_if_equal 0 repair_lock_trigger failed accum 2 trigger_if_equal 1 repair_lock_trigger failed accum 2 trigger_if_equal 2 repair_lock_trigger failed accum 2 trigger_if_equal 3 repair_lock_trigger failed } activate allies { accum 1 abort_if_equal 1 accum 2 trigger_if_equal 0 repair_lock_trigger lock accum 2 trigger_if_equal 1 repair_lock_trigger unlock_check accum 2 trigger_if_equal 2 repair_lock_trigger failed accum 2 trigger_if_equal 3 repair_lock_trigger empty } trigger lock { accum 1 abort_if_equal 1 accum 1 set 1 accum 2 set 2 trigger repair_lock_switch down wm_announce "^1Tank Repair Locks Engaged!" wm_announce "^3Fire Suppression Commencing." trigger hint_arrow_green off setstate msg_01_trigger invisible setstate msg_02_trigger default setstate repair_lock default trigger self auto_repair } trigger auto_repair { wait 1000 //////////Extinguish Flames ///////////////////// trigger turret_repair fire_machine_enable alertentity fire_ext_smoke wait 5000 setstate tank1_fire invisible setstate tank1_firehurt invisible // alertentity tank1_firelight wait 2000 alertentity tank1_smoke2 wait 2000 wm_announce "^2Fire Suppression Complete." alertentity fire_ext_smoke wait 1000 trigger turret_repair fire_machine_disable ////////////////////////////////////////////////// wait 5000 //////////Activate Repair Crane ////////////////// trigger turret_repair repair_machine_enable wait 15000 trigger tank1 script_unlock remapshader "models/praetoria/ch_tank/body" "models/praetoria/ch_tank/body" remapshaderflush trigger tank1 script_lock wait 1000 trigger turret_repair repair_machine_disable wait 2000 //////////Activate Upgrade Center //////////////// trigger up_door_L open trigger up_door_R open wait 2000 trigger upgrade_sw_trigger enable ////////////////////VO and Hint///////////////////////// trigger vo_manager tank_reinforce wm_announce "^2Tank Repairs Complete!" // trigger self release } trigger release { // accum 1 abort_if_equal 1 // accum 1 set 1 trigger hint_arrow_green on setstate msg_01_trigger invisible // setstate msg_02_trigger invisible accum 2 set 1 accum 1 set 0 resetscript } trigger unlock { trigger repair_lock_switch up setstate repair_lock invisible trigger hint_arrow_green off trigger hint_arrow_white off setstate msg_01_trigger invisible setstate msg_02_trigger invisible trigger upgrade_sw_trigger disable trigger up_door_L close trigger up_door_R close accum 2 set 3 wait 3000 wm_announce "^2Locks Disengaged." wait 3000 wm_announce "The Tank is Returning to Battle!" trigger vo_manager tank_depot_esc_vo // trigger tank1 script_unlock wait 3000 trigger tank1 giddyup accum 1 set 0 resetscript } trigger failed_repair { trigger repair_lock_switch sound_error wm_announce "^2You must first repair the tank!" trigger vo_manager tank_repair accum 1 set 0 resetscript } trigger unlock_check { accum 1 abort_if_equal 1 accum 1 set 1 accum 3 trigger_if_equal 0 repair_lock_trigger unlock accum 3 trigger_if_equal 1 repair_lock_trigger failed_repair } trigger failed { accum 1 abort_if_equal 1 accum 1 set 1 trigger repair_lock_switch sound_error accum 1 set 0 resetscript } trigger failed_repair { trigger repair_lock_switch sound_error wm_announce "^2You must first repair the tank!" wm_announce_icon 1 "repair the tank" accum 1 set 0 resetscript } trigger empty { accum 1 abort_if_equal 1 accum 1 set 1 trigger repair_lock_switch sound_error accum 1 set 0 resetscript } trigger enable { accum 1 abort_if_equal 1 accum 1 set 1 setstate msg_01_trigger invisible setstate msg_02_trigger invisible accum 2 set 0 accum 1 set 0 resetscript } } // ================================================ // Turret Repair Machines // ================================================ turret_repair { spawn { wait 100 } //Fire Machine Code trigger fire_machine_enable { wait 100 setstate fire_light_off invisible setstate fire_light_on default alertentity fire_machine_speaker } trigger fire_machine_disable { wait 100 setstate fire_light_off default setstate fire_light_on invisible alertentity fire_machine_speaker } // Repair Machine Code trigger repair_machine_enable { wait 100 setstate repair_light_off invisible setstate repair_light_on default trigger arc_welder switch alertentity repair_machine_speaker } trigger repair_machine_disable { wait 100 setstate repair_light_off default setstate repair_light_on invisible alertentity repair_machine_speaker wait 200 trigger arc_welder switch } } fire_light_off { spawn { wait 100 setstate fire_light_off default } } fire_light_on { spawn { wait 100 setstate fire_light_on invisible } } repair_light_off { spawn { wait 100 setstate repair_light_off default } } repair_light_on { spawn { wait 100 setstate repair_light_on invisible } } arc_beam { spawn { wait 100 setstate arc_beam invisible setstate arc_beam_gibber invisible stopsound } trigger start { setstate arc_beam default setstate arc_beam_gibber default // togglespeaker arc_beam_speaker playsound sound/praetoria_m2/lg_hum.wav looping volume 1024 } trigger stop { setstate arc_beam invisible setstate arc_beam_gibber invisible // togglespeaker arc_beam_speaker stopsound } } arc_welder { spawn { wait 200 accum 1 set 0 accum 2 set 0 // 0 = welder up 1 = welder down } trigger switch { accum 1 abort_if_equal 1 accum 2 trigger_if_equal 0 arc_welder down accum 2 trigger_if_equal 1 arc_welder up } trigger down { accum 1 abort_if_equal 1 accum 1 set 1 wm_announce "^3Turret Welding Commencing" playsound sound/movers/motors/motor_loop_start.wav playsound sound/movers/motors/motor_loop_02.wav gotomarker arc_welder_dn 30 wait playsound sound/movers/motors/motor_loop_end.wav trigger arc_beam start accum 2 set 1 accum 1 set 0 resetscript } trigger up { accum 1 abort_if_equal 1 accum 1 set 0 wm_announce "^3Turret Welding Complete" trigger arc_beam stop wait 1000 playsound sound/movers/motors/motor_loop_start.wav playsound sound/movers/motors/motor_loop_02.wav gotomarker arc_welder_up 30 wait playsound sound/movers/motors/motor_loop_end.wav accum 2 set 0 accum 1 set 0 resetscript } } repair_lock_switch { spawn { } trigger up { playsound sound/praetoria_m2/locks_off.wav gotomarker repair_lock_switch_up 60 wait } trigger down { playsound sound/praetoria_m2/locks_on.wav gotomarker repair_lock_switch_dn 60 wait } trigger sound_error { playsound sound/movers/switches/switch_01.wav } } // \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ // ||||||||||||||||[ TANK UPGRADER ]|||||||||||||||||||||||||||| // ///////////////////////////////////////////////////////////////////////////////////////////// upgrade_console { spawn { wait 100 faceangles 0 90 0 5000 } trigger off { changemodel models/praetoria/consoles/up_con_off.md3 } trigger on { changemodel models/praetoria/consoles/up_con_on.md3 playsound sound/praetoria_m2/upgrade_end.wav //poweron } trigger interrupt { changemodel models/praetoria/consoles/up_con_on.md3 playsound sound/movers/switches/switch_01.wav //red/green light switch sound } trigger cov { changemodel models/praetoria/consoles/up_con_cov.md3 playsound sound/praetoria_m2/switch1.wav //red/green light switch sound } trigger med { changemodel models/praetoria/consoles/up_con_med.md3 playsound sound/praetoria_m2/switch2.wav //red/green light switch sound } trigger fop { changemodel models/praetoria/consoles/up_con_fop.md3 playsound sound/praetoria_m2/switch3.wav //red/green light switch sound } trigger sol { changemodel models/praetoria/consoles/up_con_sol.md3 playsound sound/praetoria_m2/switch4.wav //red/green light switch sound } trigger eng { changemodel models/praetoria/consoles/up_con_eng.md3 playsound sound/praetoria_m2/switch5.wav //red/green light switch sound } } upgrade_display { spawn { wait 100 faceangles 0 90 0 5000 } trigger off { changemodel models/praetoria/displays/up_dis_off.md3 } trigger on { changemodel models/praetoria/displays/up_dis_on.md3 } trigger cov { changemodel models/praetoria/displays/up_dis_cov.md3 } trigger med { changemodel models/praetoria/displays/up_dis_med.md3 } trigger fop { changemodel models/praetoria/displays/up_dis_fop.md3 } trigger sol { changemodel models/praetoria/displays/up_dis_sol.md3 } trigger eng { changemodel models/praetoria/displays/up_dis_eng.md3 } } // ================================================ // UNIFIED UPRADE CONSOLE ENTITIES // ================================================ // Accum 0 = Class choice 0= null, 1 = covy, 2 = med, 3= fop, 4 = sol, 5 = eng // Accum 1 = script busy accum // Accum 2 = Trigger interrupt: 0 = off, 1 = on upgrade_sw_trigger { spawn { accum 0 set 0 //Class choice accum 1 set 0 //script busy accum accum 2 set 0 //0 = off 1 = on wait 100 setstate upgrade_sw_trigger invisible } trigger nextclass { accum 0 inc 1 accum 2 set 0 } trigger enable { setstate upgrade_sw_trigger default //Turns on trigger entity trigger upgrade_console on trigger upgrade_display on trigger self nextclass } trigger disable { setstate upgrade_sw_trigger invisible //Turns ff trigger entity trigger upgrade_console off trigger upgrade_pad off } activate axis { accum 1 abort_if_equal 1 accum 2 trigger_if_equal 1 upgrade_sw_trigger stop } activate allies { accum 1 abort_if_equal 1 accum 2 trigger_if_equal 0 upgrade_sw_trigger start } trigger stop { accum 0 trigger_if_equal 1 upgrade_sw_trigger stop_cov accum 0 trigger_if_equal 2 upgrade_sw_trigger stop_med accum 0 trigger_if_equal 3 upgrade_sw_trigger stop_fop accum 0 trigger_if_equal 4 upgrade_sw_trigger stop_sol accum 0 trigger_if_equal 5 upgrade_sw_trigger stop_eng } trigger start { accum 0 trigger_if_equal 1 upgrade_sw_trigger start_cov accum 0 trigger_if_equal 2 upgrade_sw_trigger start_med accum 0 trigger_if_equal 3 upgrade_sw_trigger start_fop accum 0 trigger_if_equal 4 upgrade_sw_trigger start_sol accum 0 trigger_if_equal 5 upgrade_sw_trigger start_eng } trigger start_cov { accum 1 set 1 //Console Switch Activation trigger upgrade_console cov trigger upgrade_pad cov trigger hint_arrow_white on trigger vo_manager tank_need_covops_vo setstate cov_up_trigger default //Turns on Class specific upgrade pit trigger accum 2 set 1 accum 1 set 0 } trigger start_med { accum 1 set 1 //Console Switch Activation trigger upgrade_console med trigger upgrade_pad med trigger hint_arrow_white on trigger vo_manager tank_need_medic_vo setstate med_up_trigger default //Turns on Class specific upgrade pit trigger accum 2 set 1 accum 1 set 0 } trigger start_fop { accum 1 set 1 //Console Switch Activation trigger upgrade_console fop trigger upgrade_pad fop trigger hint_arrow_white on trigger vo_manager tank_need_fops_vo setstate fop_up_trigger default //Turns on Class specific upgrade pit trigger accum 2 set 1 accum 1 set 0 } trigger start_sol { accum 1 set 1 //Console Switch Activation trigger upgrade_console sol trigger upgrade_pad sol trigger hint_arrow_white on trigger vo_manager tank_need_sol_vo setstate sol_up_trigger default //Turns on Class specific upgrade pit trigger accum 2 set 1 accum 1 set 0 } trigger start_eng { accum 1 set 1 //Console Switch Activation trigger upgrade_console eng trigger upgrade_pad eng trigger hint_arrow_white on trigger vo_manager tank_need_eng_vo setstate eng_up_trigger default //Turns on Class specific upgrade pit trigger accum 2 set 1 accum 1 set 0 } trigger stop_cov { accum 1 set 1 //Console Switch Dectivation trigger upgrade_console interrupt trigger upgrade_pad on trigger hint_arrow_white off setstate cov_up_trigger invisible //Turns off Class specific upgrade pit trigger trigger upgrade_control reset accum 2 set 0 accum 1 set 0 } trigger stop_med { accum 1 set 1 //Console Switch Dectivation trigger upgrade_console interrupt trigger upgrade_pad on trigger hint_arrow_white off setstate med_up_trigger invisible //Turns off Class specific upgrade pit trigger trigger upgrade_control reset accum 2 set 0 accum 1 set 0 } trigger stop_fop { accum 1 set 1 //Console Switch Dectivation trigger upgrade_console interrupt trigger upgrade_pad on trigger hint_arrow_white off setstate fop_up_trigger invisible //Turns off Class specific upgrade pit trigger trigger upgrade_control reset accum 2 set 0 accum 1 set 0 } trigger stop_sol { accum 1 set 1 //Console Switch Dectivation trigger upgrade_console interrupt trigger upgrade_pad on trigger hint_arrow_white off setstate sol_up_trigger invisible //Turns off Class specific upgrade pit trigger trigger upgrade_control reset accum 2 set 0 accum 1 set 0 } trigger stop_eng { accum 1 set 1 //Console Switch Dectivation trigger upgrade_console interrupt trigger upgrade_pad on trigger hint_arrow_white off setstate eng_up_trigger invisible //Turns off Class specific upgrade pit trigger trigger upgrade_control reset accum 2 set 0 accum 1 set 0 } } // ================================================ // UNIFIED UPRADE CONTROL // ================================================ // Accum 1 = trigger firing counter // Accum 2 = Class choice 0= null, 1 = covy, 2 = med, 3= fop, 4 = sol, 5 = eng // Accum 3 = Sound firing counter upgrade_control { spawn { wait 100 accum 1 set 0 //trigger firing counter accum 2 set 1 //Class Type counter accum 3 set 0 //Sound firing counter } trigger reset { accum 1 set 0 accum 3 set 0 } trigger timer //Counts trigger firings { accum 1 inc 1 accum 3 inc 1 trigger self update_complete trigger self sound_counter wait 1000 } trigger sound_counter { accum 3 abort_if_not_equal 3 alertentity up_start_speaker accum 3 set 0 } trigger update_complete // Check to see if all of axis objectives are complete { accum 1 abort_if_not_equal 20 accum 2 trigger_if_equal 1 upgrade_control cov_upgrade accum 2 trigger_if_equal 2 upgrade_control med_upgrade accum 2 trigger_if_equal 3 upgrade_control fop_upgrade accum 2 trigger_if_equal 4 upgrade_control sol_upgrade accum 2 trigger_if_equal 5 upgrade_control eng_upgrade accum 2 inc 1 accum 1 set 0 } trigger cov_upgrade { //Audio and Visual Notifications of Upgrade Installation trigger upgrade_display cov alertentity up_complete_speaker wm_announce "^2Jamming Transmitter Installed!" //Set the new entity visible here. // trigger tank1 cov_install //tells tank the upgrade is installed trigger tank_upgrades cov //Switches on the upgrade rig //Turn off Covy Stuff setstate cov_up_trigger invisible //Turns off Class specific upgrade pit trigger trigger upgrade_sw_trigger nextclass //Advances counter to upgrade next class in line trigger upgrade_console on //Resets console to on version trigger upgrade_pad off //Resets upgrade pad to dark version } trigger med_upgrade { //Audio and Visual Notifications of Upgrade Installation trigger upgrade_display med alertentity up_complete_speaker wm_announce "^2First Aid Kit Installed!" //Set the entity visible here. trigger tank1 med_install //Tells tank medkit installed, check for enabling trigger tank_upgrades med //changes upgrade rig model //Turn off med Stuff setstate med_up_trigger invisible //Turns off Class specific upgrade pit trigger trigger upgrade_sw_trigger nextclass //Advances counter to upgrade next class in line trigger upgrade_console on //Resets console to on version trigger upgrade_pad off //Resets upgrade pad to dark version } trigger fop_upgrade { //Audio and Visual Notifications of Upgrade Installation trigger upgrade_display fop alertentity up_complete_speaker wm_announce "^2Ammo Supply Kit Installed!" //Set the entity visible here. trigger tank1 fop_install //Tells tank ammo installed, check for enabling trigger tank_upgrades fop //changes upgrade rig model //Turn off fop Stuff setstate fop_up_trigger invisible //Turns off Class specific upgrade pit trigger trigger upgrade_sw_trigger nextclass //Advances counter to upgrade next class in line trigger upgrade_console on //Resets console to on version trigger upgrade_pad off //Resets upgrade pad to dark version } trigger sol_upgrade { //Audio and Visual Notifications of Upgrade Installation trigger upgrade_display sol alertentity up_complete_speaker wm_announce "^2Six-Shooter Cannon Installed!" //Set the entity visible here. // trigger tank1 sol_install trigger tank_upgrades sol //changes upgrade rig model //Turn off sol Stuff setstate sol_up_trigger invisible //Turns off Class specific upgrade pit trigger trigger upgrade_sw_trigger nextclass //Advances counter to upgrade next class in line trigger upgrade_console on //Resets console to on version trigger upgrade_pad off //Resets upgrade pad to dark version } trigger eng_upgrade { //Audio and Visual Notifications of Upgrade Installation trigger upgrade_display eng alertentity up_complete_speaker wm_announce "^2Armour Upgrade Installed!" //Set the entity visible here. trigger tank_upgrades eng //remaps shaders // trigger tank1 eng_install trigger at_gun_target upgrade //So AT gun knows the armour is upgraded // Set Secondary objective status to complete wm_set_main_objective 1 0 wm_set_main_objective 1 1 wm_objective_status 2 1 1 wm_objective_status 2 0 2 //Turn off eng Stuff setstate eng_up_trigger invisible //Turns off Class specific upgrade pit trigger trigger upgrade_sw_trigger disable //Turns off upgrade console because no more upgrades are available. //Repair Lock activated wait 3000 trigger repair_lock_trigger release } } // ================================================ // UNIFIED UPRADE PIT ENTITIES // ================================================ upgrade_pad { spawn { wait 100 gotomarker hint_platform 500000 faceangles 0 -90 0 5000 } trigger on { changemodel models/praetoria/consoles/plat_on.md3 } trigger off { changemodel models/praetoria/consoles/plat_off.md3 } trigger cov { changemodel models/praetoria/consoles/plat_cov.md3 } trigger med { changemodel models/praetoria/consoles/plat_med.md3 } trigger fop { changemodel models/praetoria/consoles/plat_fop.md3 } trigger sol { changemodel models/praetoria/consoles/plat_sol.md3 } trigger eng { changemodel models/praetoria/consoles/plat_eng.md3 } } cov_up_trigger { spawn { wait 100 setstate cov_up_trigger invisible } } med_up_trigger { spawn { wait 100 setstate med_up_trigger invisible } } fop_up_trigger { spawn { wait 100 setstate fop_up_trigger invisible } } sol_up_trigger { spawn { wait 100 setstate sol_up_trigger invisible } } eng_up_trigger { spawn { wait 100 setstate eng_up_trigger invisible } } // ================================================ // Misc Entities // ================================================ // Upgrade Hint Arrows hint_arrow_green { spawn { wait 100 gotomarker hint_base 50000 wait } trigger on { gotomarker hint_lock 50000 wait } trigger off { gotomarker hint_base 50000 wait } } hint_arrow_white { spawn { wait 100 gotomarker hint_base 50000 wait } trigger on { gotomarker hint_platform 50000 wait } trigger off { gotomarker hint_base 50000 wait } } up_start_speaker { spawn { wait 100 } } up_complete_speaker { spawn { wait 100 } } // ================================================ // UNIFIED UPRADE PIT DOOR ENTITIES // ================================================ up_door_l { spawn { wait 100 } trigger open { accum 1 abort_if_equal 1 accum 0 abort_if_equal 1 accum 1 set 1 accum 0 set 1 wait 3000 playsound sound/movers/doors/door5_open.wav faceangles 180 0 0 1500 accum 0 set 0 } trigger close { accum 1 abort_if_equal 0 accum 0 abort_if_equal 1 accum 1 set 0 accum 0 set 1 wait 5000 playsound sound/movers/doors/door5_close.wav faceangles 0 0 0 1500 playsound sound/movers/doors/door5_endc.wav accum 0 set 0 } } up_door_r { spawn { wait 100 } trigger open { accum 1 abort_if_equal 1 accum 0 abort_if_equal 1 accum 1 set 1 accum 0 set 1 wait 3000 playsound sound/movers/doors/door5_open.wav faceangles -180 0 0 1500 accum 0 set 0 } trigger close { accum 1 abort_if_equal 0 accum 0 abort_if_equal 1 accum 1 set 0 accum 0 set 1 wait 5000 playsound sound/movers/doors/door5_close.wav faceangles 0 0 0 1500 playsound sound/movers/doors/door5_endc.wav accum 0 set 0 } } // \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ // ||||||||||[ TANK SCRIPT START ]||||||||||||||||||||||||||||||||||| // /////////////////////////////////////////////////////////////////////////////////// //====================================================================== // TANK SUMMARY //====================================================================== // // Slot Used for // ==== ======== // 0 Tank State: // - Bit 0: Broken 0 = No 1 = Yes // - Bit 1: Moving 0 = No 1 = Yes // - Bit 2: Escort present 0 = No 1 = Yes // - Bit 3: Obstacle in the way 0 = No 1 = Yes // - Bit 4: Model shown broken 0 = No 1 = Yes // 1 Path state: // - Bit 0: Obstacle #0 present 0 = No 1 = Yes (AT GUN now automatic barrier) // - Bit 1: Obstacle #1 present 0 = No 1 = Yes (Repair Depot Door up or down) // - Bit 2: Obstacle #2 present 0 = No 1 = Yes (At Repair Locks) // - Bit 3: Obstacle #3 present 0 = No 1 = Yes (Out of Fuel) // - Bit 4: Obstacle #4 present 0 = No 1 = Yes (End of Route) // 2 wp counter // 3 Stop timer // 4 Upgrade States: // - Bit 0: CovOps upgrade present 0 = No 1 = Yes // - Bit 1: Medic upgrade present 0 = No 1 = Yes // - Bit 2: Field Ops upgrade present 0 = No 1 = Yes // - Bit 3: Soldier upgrade present 0 = No 1 = Yes // - Bit 4: Engineer upgrade present 0 = No 1 = Yes // 5 How Many Fuel Tanks Added 0, 1, or 2 // 6 ***unused*** // 7 ***unused*** // 8 ***unused*** // 9 Script lockout counter // //======================================================================== tank1 { trigger fuel_on { setstate fueltank_dropoff default setstate fueltank_toi default setstate fueltank_cm_marker default trigger tank_upgrades fuel //turns on transparent fuel cans } trigger fuel_off { setstate fueltank_dropoff invisible setstate fueltank_toi invisible setstate fueltank_cm_marker invisible } trigger add_fueltank { accum 5 inc 1 trigger tank_upgrades fuel_l //turns on left upgraded fuel can trigger fuel_tank secured accum 5 abort_if_less_than 2 trigger tank_upgrades fuel_r //turns on right upgraded fuel can trigger vo_manager final_objective_vo wm_objective_status 3 0 2 wm_objective_status 3 1 1 wm_set_main_objective 4 0 wm_set_main_objective 4 1 trigger self fuel_off trigger self obstacle_003_removed } ////////////////////////////////////////////////////////////////////////// // ================================================ // ============ Tank Initialized ================== // ================================================ // Called at the start of the game to set Tank's initial state. spawn { // Set variables to defaults accum 0 set 0 // State accum 1 set 0 // Path state accum 1 bitreset 0 // Set obstacle 0 as not present accum 1 bitreset 1 // Set obstacle 1 as not present accum 1 bitreset 2 // Set obstacle 2 as not present accum 1 bitreset 3 // Set Track as not completed. accum 1 bitreset 4 // Set Fuel as Loaded // accum 4 bitreset 0 // COV upgrade not present accum 4 bitreset 1 // MED upgrade not present accum 4 bitreset 2 // FOP upgrade not present // accum 4 bitreset 3 // SOL upgrade not present // accum 4 bitreset 4 // ENG upgrade not present accum 3 set 0 // Timer Reset accum 9 set 0 // Reset script lockout counter // Wait for entities to spawn wait 100 // Set initial position to the first wp followspline 0 wp_000 10000 accum 2 set 1 // Set default state (ie. tank ready) trigger self sound_idle trigger self anim_tracks_stop setstate tank1_smoke invisible } //////////////////////////////////////////////////////////////////////// // ================================================ // ============ Upgrade Activation ================ // ================================================ // Called when a Tank Upgrade is completed or tank is damaged and repaired //////////////////////////////////////////////////////////////////////// // trigger cov_install // { // accum 4 bitset 0 // // setchargetimefactor 1 covertops 0.85 // } trigger med_install { accum 4 bitset 1 trigger self upgrade_enable // setchargetimefactor 1 medic 0.85 } trigger fop_install { accum 4 bitset 2 trigger self upgrade_enable // setchargetimefactor 1 fieldops 0.85 } // trigger sol_install // { // accum 4 bitset 3 // // setchargetimefactor 1 soldier 0.85 // } // trigger eng_install // { // accum 4 bitset 4 // // setchargetimefactor 1 engineer 0.85 // } trigger upgrade_enable { accum 0 abort_if_bitset 0 // trigger self cov_enable trigger self med_enable trigger self fop_enable // trigger self sol_enable // trigger self eng_enable } trigger upgrade_disable { accum 0 abort_if_not_bitset 0 // trigger self cov_disable trigger self med_disable trigger self fop_disable // trigger self sol_disable // trigger self eng_disable } // trigger cov_enable // { // accum 4 abort_if_not_bitset 0 // trigger tank_radio enable // // globalaccum 6 abort_if_not_equal 0 // // setchargetimefactor 1 covertops 0.85 // } trigger med_enable { accum 4 abort_if_not_bitset 1 setstate tank_healthtrgr default // globalaccum 6 abort_if_not_equal 0 // setchargetimefactor 1 medic 0.85 } trigger fop_enable { accum 4 abort_if_not_bitset 2 setstate tank_ammotrgr default // globalaccum 6 abort_if_not_equal 0 // setchargetimefactor 1 fieldops 0.85 } // trigger sol_enable // { // accum 4 abort_if_not_bitset 3 // trigger tank_panzer enable // // globalaccum 6 abort_if_not_equal 0 // // setchargetimefactor 1 soldier 0.85 // } // trigger eng_enable // { // accum 4 abort_if_not_bitset 4 // // globalaccum 6 abort_if_not_equal 0 // // setchargetimefactor 1 engineer 0.85 // } // trigger cov_disable // { // accum 4 abort_if_not_bitset 0 // trigger tank_radio disable // // globalaccum 6 abort_if_not_equal 0 // // setchargetimefactor 1 covertops 1 // } trigger med_disable { accum 4 abort_if_not_bitset 1 setstate tank_healthtrgr invisible // globalaccum 6 abort_if_not_equal 0 // setchargetimefactor 1 medic 1 } trigger fop_disable { accum 4 abort_if_not_bitset 2 setstate tank_ammotrgr invisible // globalaccum 6 abort_if_not_equal 0 // setchargetimefactor 1 fieldops 1 } // trigger sol_disable // { // accum 4 abort_if_not_bitset 3 // trigger tank_panzer disable // // globalaccum 6 abort_if_not_equal 0 // // setchargetimefactor 1 soldier 1 // } // trigger eng_disable // { // accum 4 abort_if_not_bitset 4 // // globalaccum 6 abort_if_not_equal 0 // // setchargetimefactor 1 engineer 1 // } //////////////////////////////////////////////////////////////////////// // ================================================ // ============ Tank Damaged ====================== // ================================================ // Called when the Tank entity is hurt //////////////////////////////////////////////////////////////////////// pain { } //////////////////////////////////////////////////////////////////////// // ================================================ // ============ Tank Disabled ===================== // ================================================ // Called when the Tank entity is disabled or destroyed //////////////////////////////////////////////////////////////////////// death { // Update state bits accum 0 bitset 0 // Mark as broken, which mean it will stop at next wp trigger repair_lock_trigger tank_disabled trigger self upgrade_disable trigger at_gun_trigger tank_bad } //////////////////////////////////////////////////////////////////////// // ================================================ // ============ Tank Repaired ===================== // ================================================ // Indirectly called when the entity is repaired //////////////////////////////////////////////////////////////////////// rebirth { // Lock script trigger self script_lock // Change from broken to fixed model changemodel models/praetoria/ch_tank/ch_tank.md3 // Remove smoke setstate tank1_smoke invisible //==================================================================================== wm_announce "The Tank has been Repaired!" // *----------------------------------- vo ------------------------------------------* //==================================================================================== wm_teamvoiceannounce 0 "axis_hq_tank_repaired_allies" wm_teamvoiceannounce 1 "allies_hq_tank_repaired" wait 200 //wm_addteamvoiceannounce 0 "axis_hq_tank_stop" wm_removeteamvoiceannounce 1 "allies_hq_tank_damaged_axis" // *---------------------------------------------------------------------------------* //==================================================================================== // Start trigger tank1_sound rebirth wait 500 // Update state bits accum 0 bitreset 0 // Mark as not broken accum 0 bitreset 4 // Mark as visually not broken // Unlock script trigger self script_unlock trigger self upgrade_enable trigger repair_lock_trigger tank_repaired trigger at_gun_trigger tank_ok // Tells AT Gun script that tank is repaired } //////////////////////////////////////////////////////////////////////// // ================================================ // ============ MG42 Setup ======================== // ================================================ // Called when a player is using the mounted MG //////////////////////////////////////////////////////////////////////// mg42 mount { } // Called when a player is no longer using the mounted MG mg42 unmount { } //////////////////////////////////////////////////////////////////////// //====================================================================== // SCRIPTLOCK FUNCTIONS //====================================================================== //////////////////////////////////////////////////////////////////////// trigger script_lock { accum 9 inc 1 } trigger script_unlock { accum 9 inc -1 } //////////////////////////////////////////////////////////////////////// //================================================================== // ESCORT SCRIPTING //================================================================== //////////////////////////////////////////////////////////////////////// // ESCORT TRIGGER // This function is called when a player moves inside the escort zone //////////////////////////////////////////////////////////////////////// trigger escort_trigger { // Check for obstacles trigger self check_obstacle_status // Update state bits and counters accum 0 bitset 2 // Mark as escort present accum 3 set 0 // Reset stop timer // Check if allowed to move accum 0 abort_if_bitset 0 // Abort if its broken accum 0 abort_if_bitset 1 // Abort if its already moving accum 0 abort_if_bitset 3 // Abort if an obstacle is in the way accum 1 abort_if_bitset 4 // Abort if end of line (this was 2) accum 9 abort_if_not_equal 0 // Abort if the script is currently locked // Lock script trigger self script_lock // Starting state trigger tank1_sound start startanimation 55 10 15 nolerp norandom wait 666 // Driving state trigger self anim_tracks_forward startanimation 5 40 15 nolerp norandom // Wait a bit before starting to move wait 500 // Unlock script trigger self script_unlock // Start movement loop trigger self move } //////////////////////////////////////////////////////////////////////// // ESCORT TIMER // This function is called periodicly by a func_timer entity in the map. // Each time it checks a counter to see if the escort has been gone too // long. The counter is reset by the escort trigger function. //////////////////////////////////////////////////////////////////////// trigger timer { // Increase counter, and if it hasn't reached 4 then abort accum 3 inc 1 accum 3 abort_if_less_than 4 // Update state bits accum 0 bitreset 2 // Mark as not escorted, which means it will stop at next wp // Need to periodicly check if the tank has been damaged trigger self check_death } //////////////////////////////////////////////////////////////////////// //====================================================================== // MOVE FUNCTIONS //====================================================================== //////////////////////////////////////////////////////////////////////// // MOVE INCREMENTS // Called at the end of each move. If it passes some checks the movement is repeated //////////////////////////////////////////////////////////////////////// trigger move_increment { accum 2 inc 1 // Increment wp counter // Check if its ok to proceed to the next wp trigger self check_death trigger self check_escort trigger self check_obstacle // This loop is used so that the tank can immediately advance after completing the move trigger self move } //////////////////////////////////////////////////////////////////////// // TANK DETOUR CHOICES //////////////////////////////////////////////////////////////////////// // trigger choose_path // { // globalaccum 5 trigger_if_equal 0 tank1 pistols_at_dawn // globalaccum 5 trigger_if_equal 1 tank1 all_clear // } // trigger move_assault // { // accum 2 set 17 // Increment wp counter // trigger self obstacle_000_removed //Remove AT Gun as an obstacle // Check if its ok to proceed to the next wp // trigger self check_death // trigger self check_escort // trigger self check_obstacle // This loop is used so that the tank can immediately advance after completing the move // trigger self move // } trigger move_detour { wait 5000 trigger self script_unlock accum 2 set 100 trigger self obstacle_000_removed //Remove AT Gun as an obstacle // Check if its ok to proceed to the next wp trigger self check_death trigger self check_escort trigger self check_obstacle // This loop is used so that the tank can immediately advance after completing the move trigger self move } trigger move_return { accum 2 set 200 // Increment wp counter // trigger self obstacle_000_removed //Remove AT Gun as an obstacle // Check if its ok to proceed to the next wp trigger self check_death trigger self check_escort trigger self check_obstacle // This loop is used so that the tank can immediately advance after completing the move trigger self move } trigger move_caution { accum 2 set 17 // Increment wp counter trigger self obstacle_000_removed //Remove AT Gun as an obstacle // Check if its ok to proceed to the next wp trigger self check_death trigger self check_escort trigger self check_obstacle // This loop is used so that the tank can immediately advance after completing the move trigger self move } //////////////////////////////////////////////////////////////////////// // MOVEMENT TRIGGERS //////////////////////////////////////////////////////////////////////// trigger move { // The obstacle bit is still valid because of the obstacle check done by the calling function accum 0 abort_if_bitset 3 // Abort if an obstacle is in the way //////////////////////////////////////////////////////////////////////// // FIRST STAGE MOVEMENT //////////////////////////////////////////////////////////////////////// accum 2 trigger_if_equal 1 tank1 move_from_001 accum 2 trigger_if_equal 2 tank1 move_from_002 accum 2 trigger_if_equal 3 tank1 move_from_003 accum 2 trigger_if_equal 4 tank1 move_from_004 accum 2 trigger_if_equal 5 tank1 move_from_005 //Destroy the Main Bunker Exit accum 2 trigger_if_equal 6 tank1 move_from_006 accum 2 trigger_if_equal 7 tank1 move_from_007 accum 2 trigger_if_equal 8 tank1 move_from_008 accum 2 trigger_if_equal 9 tank1 move_from_009 accum 2 trigger_if_equal 10 tank1 move_from_010 accum 2 trigger_if_equal 11 tank1 move_from_011 accum 2 trigger_if_equal 12 tank1 move_from_012 accum 2 trigger_if_equal 13 tank1 move_from_013 accum 2 trigger_if_equal 14 tank1 move_from_014 accum 2 trigger_if_equal 15 tank1 move_from_015 accum 2 trigger_if_equal 16 tank1 move_from_017 //Check AT Gun Status //////////////////////////////////////////////////////////////////////// // SECOND STAGE MOVEMENT //////////////////////////////////////////////////////////////////////// accum 2 trigger_if_equal 17 tank1 move_from_017 accum 2 trigger_if_equal 18 tank1 move_from_018 accum 2 trigger_if_equal 19 tank1 move_from_019 accum 2 trigger_if_equal 20 tank1 move_from_020 accum 2 trigger_if_equal 21 tank1 move_from_021 accum 2 trigger_if_equal 22 tank1 move_from_022 accum 2 trigger_if_equal 23 tank1 move_from_023 accum 2 trigger_if_equal 24 tank1 move_from_024 accum 2 trigger_if_equal 25 tank1 move_from_025 accum 2 trigger_if_equal 26 tank1 move_from_026 accum 2 trigger_if_equal 27 tank1 move_from_027 accum 2 trigger_if_equal 28 tank1 move_from_028 accum 2 trigger_if_equal 29 tank1 move_from_029 accum 2 trigger_if_equal 30 tank1 move_from_030 accum 2 trigger_if_equal 31 tank1 move_from_031 accum 2 trigger_if_equal 32 tank1 move_from_032 accum 2 trigger_if_equal 33 tank1 move_from_033 accum 2 trigger_if_equal 34 tank1 move_from_034 accum 2 trigger_if_equal 35 tank1 move_from_035 // Tank has crossed the bridge accum 2 trigger_if_equal 36 tank1 move_from_036 accum 2 trigger_if_equal 37 tank1 move_from_037 accum 2 trigger_if_equal 38 tank1 move_from_038 accum 2 trigger_if_equal 39 tank1 move_from_039 accum 2 trigger_if_equal 40 tank1 move_from_040 accum 2 trigger_if_equal 41 tank1 move_from_041 accum 2 trigger_if_equal 42 tank1 move_from_042 accum 2 trigger_if_equal 43 tank1 move_from_043 accum 2 trigger_if_equal 44 tank1 move_from_044 accum 2 trigger_if_equal 45 tank1 move_from_045 accum 2 trigger_if_equal 46 tank1 move_from_046 accum 2 trigger_if_equal 47 tank1 move_from_047 accum 2 trigger_if_equal 48 tank1 move_from_048 accum 2 trigger_if_equal 49 tank1 move_from_049 accum 2 trigger_if_equal 50 tank1 move_from_050 accum 2 trigger_if_equal 51 tank1 move_from_051 accum 2 trigger_if_equal 52 tank1 move_from_052 accum 2 trigger_if_equal 53 tank1 move_from_053 accum 2 trigger_if_equal 54 tank1 move_from_054 // Destroy the Gates: Get the Fuel accum 2 trigger_if_equal 55 tank1 move_from_055 accum 2 trigger_if_equal 56 tank1 move_from_056 accum 2 trigger_if_equal 57 tank1 move_from_057 accum 2 trigger_if_equal 58 tank1 move_from_058 accum 2 trigger_if_equal 59 tank1 move_from_059 accum 2 trigger_if_equal 60 tank1 move_from_060 accum 2 trigger_if_equal 61 tank1 move_from_061 accum 2 trigger_if_equal 62 tank1 move_from_062 accum 2 trigger_if_equal 63 tank1 move_from_063 accum 2 trigger_if_equal 64 tank1 move_from_064 accum 2 trigger_if_equal 65 tank1 move_from_065 accum 2 trigger_if_equal 66 tank1 move_from_066 accum 2 trigger_if_equal 67 tank1 move_from_067 accum 2 trigger_if_equal 68 tank1 move_from_068 accum 2 trigger_if_equal 69 tank1 move_from_069 accum 2 trigger_if_equal 70 tank1 move_from_070 accum 2 trigger_if_equal 71 tank1 move_from_071 accum 2 trigger_if_equal 72 tank1 move_from_072 accum 2 trigger_if_equal 73 tank1 move_from_073 accum 2 trigger_if_equal 74 tank1 move_from_074 accum 2 trigger_if_equal 75 tank1 move_from_075 accum 2 trigger_if_equal 76 tank1 move_from_076 // Destroy the Gates: accum 2 trigger_if_equal 77 tank1 move_from_077 accum 2 trigger_if_equal 78 tank1 move_from_078 accum 2 trigger_if_equal 79 tank1 move_from_079 accum 2 trigger_if_equal 80 tank1 move_from_080 accum 2 trigger_if_equal 81 tank1 move_from_081 accum 2 trigger_if_equal 82 tank1 move_from_082 accum 2 trigger_if_equal 83 tank1 move_from_083 accum 2 trigger_if_equal 84 tank1 move_from_084 accum 2 trigger_if_equal 85 tank1 move_from_085 accum 2 trigger_if_equal 86 tank1 move_from_086 accum 2 trigger_if_equal 87 tank1 move_from_087 accum 2 trigger_if_equal 88 tank1 move_from_088 accum 2 trigger_if_equal 89 tank1 move_from_089 accum 2 trigger_if_equal 90 tank1 move_from_090 accum 2 trigger_if_equal 91 tank1 move_from_091 accum 2 trigger_if_equal 92 tank1 move_from_092 accum 2 trigger_if_equal 93 tank1 move_from_093 accum 2 trigger_if_equal 94 tank1 move_from_094 accum 2 trigger_if_equal 95 tank1 move_from_095 accum 2 trigger_if_equal 96 tank1 move_from_096 accum 2 trigger_if_equal 97 tank1 move_from_097 //End of Route //////////////////////////////////////////////////////////////////////// // MOVE TO REPAIR DEPOT AND BACK //////////////////////////////////////////////////////////////////////// accum 2 trigger_if_equal 100 tank1 move_from_100 //Tank splits to new track to go to repair bay accum 2 trigger_if_equal 101 tank1 move_from_101 accum 2 trigger_if_equal 102 tank1 move_from_102 accum 2 trigger_if_equal 103 tank1 move_from_103 accum 2 trigger_if_equal 104 tank1 move_from_104 accum 2 trigger_if_equal 105 tank1 move_from_105 accum 2 trigger_if_equal 106 tank1 move_from_106 accum 2 trigger_if_equal 107 tank1 move_from_107 accum 2 trigger_if_equal 108 tank1 move_from_108 // Tank Approching Doors accum 2 trigger_if_equal 109 tank1 move_from_109 accum 2 trigger_if_equal 110 tank1 move_from_110 accum 2 trigger_if_equal 111 tank1 move_from_111 // Enter The Repair Locks accum 2 trigger_if_equal 112 tank1 move_from_112 // Stay in Place accum 2 trigger_if_equal 113 tank1 move_from_113 // Stay in Place //////////////////////////////////////////////////////////////////////// // MOVE BACK TO DESTROYED LOCATION //////////////////////////////////////////////////////////////////////// accum 2 trigger_if_equal 200 tank1 move_from_200 // Begin Return Trip accum 2 trigger_if_equal 201 tank1 move_from_201 accum 2 trigger_if_equal 202 tank1 move_from_202 accum 2 trigger_if_equal 203 tank1 move_from_203 accum 2 trigger_if_equal 204 tank1 move_from_204 accum 2 trigger_if_equal 205 tank1 move_from_205 accum 2 trigger_if_equal 206 tank1 move_from_206 accum 2 trigger_if_equal 207 tank1 move_from_207 accum 2 trigger_if_equal 208 tank1 move_from_208 accum 2 trigger_if_equal 209 tank1 move_from_209 accum 2 trigger_if_equal 210 tank1 move_from_210 accum 2 trigger_if_equal 211 tank1 move_from_211 accum 2 trigger_if_equal 212 tank1 move_from_017 } //////////////////////////////////////////////////////////////////////// // ================================================ // ============ WAYPOINTS ========================= // ================================================ //////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////// // FIRST STAGE MOVEMENT //////////////////////////////////////////////////////////////////////// // Move from waypoint 001 trigger move_from_001 { accum 0 bitset 1 // Mark as moving followspline 0 wp_001 80 wait length -64 accum 0 bitreset 1 // Mark as not moving // If you want waypoints to loop, this is the place to reset the wp counter // on the last waypoint. // Make sure that the last waypoint targets wp_001 to loop correctly //accum 2 set 0 // Make the waypoints loop around trigger self move_increment } // Move from waypoint 002 trigger move_from_002 { accum 0 bitset 1 // Mark as moving followspline 0 wp_002 80 wait length -64 accum 0 bitreset 1 // Mark as not moving trigger self move_increment } // Move from waypoint 003 trigger move_from_003 { accum 0 bitset 1 // Mark as moving followspline 0 wp_003 80 wait length -64 accum 0 bitreset 1 // Mark as not moving trigger self move_increment // trigger tank1 obstacle_004_added //End of Path. Testing only // trigger self finale //End of Path Testing only } // Move from waypoint 004 trigger move_from_004 { accum 0 bitset 1 // Mark as moving followspline 0 wp_004 80 wait length -64 accum 0 bitreset 1 // Mark as not moving trigger self move_increment } //////////////////////////////////////////////////////////////////////// // First Firing Sequence //////////////////////////////////////////////////////////////////////// // Move from waypoint 005 trigger move_from_005 { accum 0 bitset 1 // Mark as moving followspline 0 wp_005 80 wait length -64 accum 0 bitreset 1 // Mark as not moving // Lock script trigger self script_lock // Stop sound trigger tank1_sound stop // Stopping state trigger self anim_tracks_stop startanimation 45 10 15 nolerp norandom wait 666 // Stationary state startanimation 0 1 15 nolerp norandom // Wait a little until starting the fireing sequence wait 900 // Manually increment wp counter accum 2 inc 1 // This turret function will unlock the script when its done trigger tank1_turret fire_at_target_1 //trigger self move_increment } //////////////////////////////////////////////////////////////////////// // Move from waypoint 006 trigger move_from_006 { accum 0 bitset 1 // Mark as moving followspline 0 wp_006 20 wait length -64 accum 0 bitreset 1 // Mark as not moving trigger self move_increment } // Move from waypoint 007 trigger move_from_007 { accum 0 bitset 1 // Mark as moving followspline 0 wp_007 80 wait length -64 accum 0 bitreset 1 // Mark as not moving trigger self move_increment } // Move from waypoint 008 trigger move_from_008 { accum 0 bitset 1 // Mark as moving followspline 0 wp_008 80 wait length -64 accum 0 bitreset 1 // Mark as not moving trigger self move_increment } // Move from waypoint 009 trigger move_from_009 { accum 0 bitset 1 // Mark as moving followspline 0 wp_009 80 wait length -64 accum 0 bitreset 1 // Mark as not moving trigger self move_increment } // Move from waypoint 010 trigger move_from_010 { accum 0 bitset 1 // Mark as moving followspline 0 wp_010 80 wait length -64 accum 0 bitreset 1 // Mark as not moving trigger self move_increment } // Move from waypoint 011 trigger move_from_011 { accum 0 bitset 1 // Mark as moving followspline 0 wp_011 80 wait length -64 accum 0 bitreset 1 // Mark as not moving trigger self move_increment } // Move from waypoint 012 trigger move_from_012 { accum 0 bitset 1 // Mark as moving followspline 0 wp_012 80 wait length -64 accum 0 bitreset 1 // Mark as not moving trigger self move_increment } // Move from waypoint 013 trigger move_from_013 { accum 0 bitset 1 // Mark as moving followspline 0 wp_013 80 wait length -64 accum 0 bitreset 1 // Mark as not moving trigger self move_increment } // Move from waypoint 014 trigger move_from_014 { accum 0 bitset 1 // Mark as moving followspline 0 wp_014 80 wait length -64 accum 0 bitreset 1 // Mark as not moving trigger self move_increment } // Move from waypoint 015 trigger move_from_015 { accum 0 bitset 1 // Mark as moving followspline 0 wp_015 80 wait length -64 // accum 0 bitreset 1 // Mark as not moving // trigger self choose_path trigger self pistols_at_dawn } //////////////////////////////////////////////////////////////////////// // AT Gun Firing Duel //////////////////////////////////////////////////////////////////////// // End of Stage 1 route trigger pistols_at_dawn { accum 0 bitreset 1 // Mark as not moving // Lock script trigger self script_lock // Stop sound trigger tank1_sound stop // Stopping state trigger self anim_tracks_stop startanimation 45 10 15 nolerp norandom wait 666 // Stationary state startanimation 0 1 15 nolerp norandom // wm_announce "^3Scouting the Area" // Wait a little until starting the fireing sequence // wait 3000 wm_announce "^1WARNING: ^3AT Gun spotted! ^1FIRE AT WILL!!!" // This turret function will unlock the script when its done trigger tank1_turret fire_at_target_2 } //////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////// // AT Gun Destroyed //////////////////////////////////////////////////////////////////////// // End of Stage 1 route // trigger all_clear // { // wm_announce "^2AT Gun destroyed! Continue assault on the Depot Yard!" // trigger self anim_tracks_turningleft // faceangles 0 360 0 4000 // pitch yaw roll time(ms) // trigger self anim_tracks_forward // // trigger self move_assault // } //////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////// // AT Gun Destroyed after tank shoots //////////////////////////////////////////////////////////////////////// // End of Stage 1 route // trigger all_clear2 // { // accum 0 bitset 1 // Mark as not moving // wm_announce "^2AT Gun has been destroyed!!!" // trigger vo_manager tank_depot_esc_vo // Starting state // trigger tank1_sound start // startanimation 55 10 15 nolerp norandom // wait 666 // wait 100 // // // Driving state // trigger tank1_sound move // startanimation 5 40 15 nolerp norandom // trigger self anim_tracks_turningleft // faceangles 0 360 0 4000// pitch yaw roll time(ms) // Wait a bit before starting to move // wait 100 // Unlock script // trigger self script_unlock // Start movement loop // trigger self move_assault // } //////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////// // SECOND STAGE MOVEMENT //////////////////////////////////////////////////////////////////////// // Move from waypoint 017 trigger move_from_017 { accum 0 bitset 1 // Mark as moving followspline 0 wp_017 80 wait length -64 accum 0 bitreset 1 // Mark as not moving trigger self move_increment } // Move from waypoint 018 trigger move_from_018 { accum 0 bitset 1 // Mark as moving followspline 0 wp_018 80 wait length -64 accum 0 bitreset 1 // Mark as not moving trigger self move_increment } // Move from waypoint 019 trigger move_from_019 { accum 0 bitset 1 // Mark as moving followspline 0 wp_019 80 wait length -64 accum 0 bitreset 1 // Mark as not moving trigger self move_increment } // Move from waypoint 020 trigger move_from_020 { accum 0 bitset 1 // Mark as moving followspline 0 wp_020 80 wait length -64 accum 0 bitreset 1 // Mark as not moving trigger self move_increment } // Move from waypoint 021 trigger move_from_021 { accum 0 bitset 1 // Mark as moving followspline 0 wp_021 80 wait length -64 accum 0 bitreset 1 // Mark as not moving trigger self move_increment } // Move from waypoint 022 trigger move_from_022 { accum 0 bitset 1 // Mark as moving followspline 0 wp_022 80 wait length -64 accum 0 bitreset 1 // Mark as not moving trigger self move_increment } // Move from waypoint 023 trigger move_from_023 { accum 0 bitset 1 // Mark as moving followspline 0 wp_023 80 wait length -64 accum 0 bitreset 1 // Mark as not moving trigger self move_increment } // Move from waypoint 024 trigger move_from_024 { accum 0 bitset 1 // Mark as moving followspline 0 wp_024 80 wait length -64 accum 0 bitreset 1 // Mark as not moving trigger self move_increment } // Move from waypoint 025 trigger move_from_025 { accum 0 bitset 1 // Mark as moving followspline 0 wp_025 80 wait length -64 accum 0 bitreset 1 // Mark as not moving trigger self move_increment } // Move from waypoint 026 trigger move_from_026 { accum 0 bitset 1 // Mark as moving followspline 0 wp_026 80 wait length -64 accum 0 bitreset 1 // Mark as not moving trigger self move_increment } // Move from waypoint 027 trigger move_from_027 { accum 0 bitset 1 // Mark as moving followspline 0 wp_027 80 wait length -64 accum 0 bitreset 1 // Mark as not moving trigger self move_increment } // Move from waypoint 028 trigger move_from_028 { accum 0 bitset 1 // Mark as moving followspline 0 wp_028 80 wait length -64 accum 0 bitreset 1 // Mark as not moving trigger self move_increment } // Move from waypoint 029 trigger move_from_029 { accum 0 bitset 1 // Mark as moving followspline 0 wp_029 80 wait length -64 accum 0 bitreset 1 // Mark as not moving trigger self move_increment } // Move from waypoint 030 trigger move_from_030 { accum 0 bitset 1 // Mark as moving followspline 0 wp_030 80 wait length -64 accum 0 bitreset 1 // Mark as not moving trigger tank_upgrades fire trigger self move_increment } // Move from waypoint 031 trigger move_from_031 { accum 0 bitset 1 // Mark as moving followspline 0 wp_031 80 wait length -64 accum 0 bitreset 1 // Mark as not moving trigger self move_increment } // Move from waypoint 032 trigger move_from_032 { accum 0 bitset 1 // Mark as moving followspline 0 wp_032 80 wait length -64 accum 0 bitreset 1 // Mark as not moving trigger self move_increment } // Move from waypoint 033 trigger move_from_033 { accum 0 bitset 1 // Mark as moving followspline 0 wp_033 80 wait length -64 accum 0 bitreset 1 // Mark as not moving trigger self move_increment } // Move from waypoint 034 trigger move_from_034 { accum 0 bitset 1 // Mark as moving followspline 0 wp_034 80 wait length -64 accum 0 bitreset 1 // Mark as not moving trigger self move_increment } // Move from waypoint 035 trigger move_from_035 { accum 0 bitset 1 // Mark as moving followspline 0 wp_035 80 wait length -64 accum 0 bitreset 1 // Mark as not moving trigger self move_increment } // Move from waypoint 036 trigger move_from_036 { accum 0 bitset 1 // Mark as moving followspline 0 wp_036 80 wait length -64 accum 0 bitreset 1 // Mark as not moving trigger self move_increment } // Move from waypoint 037 trigger move_from_037 { accum 0 bitset 1 // Mark as moving followspline 0 wp_037 80 wait length -64 accum 0 bitreset 1 // Mark as not moving trigger self move_increment } // Move from waypoint 038 trigger move_from_038 { accum 0 bitset 1 // Mark as moving followspline 0 wp_038 80 wait length -64 accum 0 bitreset 1 // Mark as not moving trigger self move_increment } // Move from waypoint 039 trigger move_from_039 { accum 0 bitset 1 // Mark as moving followspline 0 wp_039 80 wait length -64 accum 0 bitreset 1 // Mark as not moving trigger self move_increment } // Move from waypoint 040 trigger move_from_040 { accum 0 bitset 1 // Mark as moving followspline 0 wp_040 80 wait length -64 accum 0 bitreset 1 // Mark as not moving trigger self move_increment } // Move from waypoint 041 trigger move_from_041 { accum 0 bitset 1 // Mark as moving followspline 0 wp_041 80 wait length -64 accum 0 bitreset 1 // Mark as not moving trigger vo_manager atgun_past_vo //Tank is past the AT gun trigger at_gun_trigger range_bad trigger self move_increment } // Move from waypoint 042 trigger move_from_042 { accum 0 bitset 1 // Mark as moving followspline 0 wp_042 80 wait length -64 accum 0 bitreset 1 // Mark as not moving trigger self move_increment } // Move from waypoint 043 trigger move_from_043 { accum 0 bitset 1 // Mark as moving followspline 0 wp_043 80 wait length -64 accum 0 bitreset 1 // Mark as not moving trigger self move_increment } // Move from waypoint 044 trigger move_from_044 { accum 0 bitset 1 // Mark as moving followspline 0 wp_044 80 wait length -64 accum 0 bitreset 1 // Mark as not moving trigger self move_increment } // Move from waypoint 045 trigger move_from_045 { accum 0 bitset 1 // Mark as moving followspline 0 wp_045 80 wait length -64 accum 0 bitreset 1 // Mark as not moving trigger self move_increment } // Move from waypoint 046 trigger move_from_046 { accum 0 bitset 1 // Mark as moving followspline 0 wp_046 80 wait length -64 accum 0 bitreset 1 // Mark as not moving trigger self move_increment } // Move from waypoint 047 trigger move_from_047 { accum 0 bitset 1 // Mark as moving followspline 0 wp_047 80 wait length -64 accum 0 bitreset 1 // Mark as not moving trigger self move_increment } // Move from waypoint 048 trigger move_from_048 { accum 0 bitset 1 // Mark as moving followspline 0 wp_048 80 wait length -64 accum 0 bitreset 1 // Mark as not moving trigger self move_increment } // Move from waypoint 049 trigger move_from_049 { accum 0 bitset 1 // Mark as moving followspline 0 wp_049 80 wait length -64 accum 0 bitreset 1 // Mark as not moving trigger self move_increment } // Move from waypoint 050 trigger move_from_050 { accum 0 bitset 1 // Mark as moving followspline 0 wp_050 80 wait length -64 accum 0 bitreset 1 // Mark as not moving trigger self move_increment } // Move from waypoint 051 trigger move_from_051 { accum 0 bitset 1 // Mark as moving followspline 0 wp_051 80 wait length -64 accum 0 bitreset 1 // Mark as not moving trigger self move_increment } // Move from waypoint 052 trigger move_from_052 { accum 0 bitset 1 // Mark as moving followspline 0 wp_052 80 wait length -64 accum 0 bitreset 1 // Mark as not moving trigger self move_increment } // Move from waypoint 053 trigger move_from_053 { accum 0 bitset 1 // Mark as moving followspline 0 wp_053 80 wait length -64 accum 0 bitreset 1 // Mark as not moving trigger self move_increment } // Move from waypoint 054 trigger move_from_054 { accum 0 bitset 1 // Mark as moving followspline 0 wp_054 80 wait length -64 accum 0 bitreset 1 // Mark as not moving trigger tank1 obstacle_003_added //Tank is out of Fuel // Lock script trigger self script_lock // Stop sound trigger tank1_sound stop // Stopping state trigger self anim_tracks_stop startanimation 45 10 15 nolerp norandom wait 666 // Stationary state startanimation 0 1 15 nolerp norandom // Wait a little until starting the fireing sequence wait 900 // Manually increment wp counter accum 2 inc 1 // This turret function will unlock the script when its done trigger tank1_turret fire_at_target_3 trigger at_gun flash_switch trigger at_gun_target switch_armour //Tank takes 2 times damage from the rear. trigger tank1 fuel_on //Turn on red fuel cands } //////////////////////////////////////////////////////////////////////// // MOVE TO Airfield Tunnel //////////////////////////////////////////////////////////////////////// // Move from waypoint 055 trigger move_from_055 { accum 0 bitset 1 // Mark as moving followspline 0 wp_055 80 wait length -64 accum 0 bitreset 1 // Mark as not moving trigger self move_increment } // Move from waypoint 056 trigger move_from_056 { accum 0 bitset 1 // Mark as moving followspline 0 wp_056 80 wait length -64 accum 0 bitreset 1 // Mark as not moving trigger self move_increment } // Move from waypoint 057 trigger move_from_057 { accum 0 bitset 1 // Mark as moving followspline 0 wp_057 80 wait length -64 accum 0 bitreset 1 // Mark as not moving trigger self move_increment } // Move from waypoint 058 trigger move_from_058 { accum 0 bitset 1 // Mark as moving followspline 0 wp_058 80 wait length -64 accum 0 bitreset 1 // Mark as not moving trigger self move_increment } // Move from waypoint 059 trigger move_from_059 { accum 0 bitset 1 // Mark as moving followspline 0 wp_059 80 wait length -64 accum 0 bitreset 1 // Mark as not moving trigger self move_increment } // Move from waypoint 060 trigger move_from_060 { accum 0 bitset 1 // Mark as moving followspline 0 wp_060 80 wait length -64 accum 0 bitreset 1 // Mark as not moving trigger self move_increment } // Move from waypoint 061 trigger move_from_061 { accum 0 bitset 1 // Mark as moving followspline 0 wp_061 80 wait length -64 accum 0 bitreset 1 // Mark as not moving trigger self move_increment } // Move from waypoint 062 trigger move_from_062 { accum 0 bitset 1 // Mark as moving followspline 0 wp_062 80 wait length -64 accum 0 bitreset 1 // Mark as not moving trigger self move_increment } // Move from waypoint 063 trigger move_from_063 { accum 0 bitset 1 // Mark as moving followspline 0 wp_063 80 wait length -64 accum 0 bitreset 1 // Mark as not moving trigger self move_increment } // Move from waypoint 064 trigger move_from_064 { accum 0 bitset 1 // Mark as moving followspline 0 wp_064 80 wait length -64 accum 0 bitreset 1 // Mark as not moving trigger self move_increment } // Move from waypoint 065 trigger move_from_065 { accum 0 bitset 1 // Mark as moving followspline 0 wp_065 80 wait length -64 accum 0 bitreset 1 // Mark as not moving trigger self move_increment } // Move from waypoint 066 trigger move_from_066 { accum 0 bitset 1 // Mark as moving followspline 0 wp_066 80 wait length -64 accum 0 bitreset 1 // Mark as not moving trigger self move_increment } // Move from waypoint 067 trigger move_from_067 { accum 0 bitset 1 // Mark as moving followspline 0 wp_067 80 wait length -64 accum 0 bitreset 1 // Mark as not moving trigger self move_increment } // Move from waypoint 068 trigger move_from_068 { accum 0 bitset 1 // Mark as moving followspline 0 wp_068 80 wait length -64 accum 0 bitreset 1 // Mark as not moving trigger self move_increment } // Move from waypoint 069 trigger move_from_069 { accum 0 bitset 1 // Mark as moving followspline 0 wp_069 80 wait length -64 accum 0 bitreset 1 // Mark as not moving trigger at_gun_trigger range_ok trigger vo_manager gun_fire trigger self move_increment } // Move from waypoint 070 trigger move_from_070 { accum 0 bitset 1 // Mark as moving followspline 0 wp_070 80 wait length -64 accum 0 bitreset 1 // Mark as not moving trigger self move_increment } // Move from waypoint 071 trigger move_from_071 { accum 0 bitset 1 // Mark as moving followspline 0 wp_071 80 wait length -64 accum 0 bitreset 1 // Mark as not moving trigger self move_increment } // Move from waypoint 072 trigger move_from_072 { accum 0 bitset 1 // Mark as moving followspline 0 wp_072 80 wait length -64 accum 0 bitreset 1 // Mark as not moving trigger self move_increment } // Move from waypoint 073 trigger move_from_073 { accum 0 bitset 1 // Mark as moving followspline 0 wp_073 80 wait length -64 accum 0 bitreset 1 // Mark as not moving trigger self move_increment } // Move from waypoint 074 trigger move_from_074 { accum 0 bitset 1 // Mark as moving followspline 0 wp_074 80 wait length -64 accum 0 bitreset 1 // Mark as not moving trigger self move_increment } // Move from waypoint 075 trigger move_from_075 { accum 0 bitset 1 // Mark as moving followspline 0 wp_075 80 wait length -64 accum 0 bitreset 1 // Mark as not moving trigger self move_increment } // Move from waypoint 076 trigger move_from_076 { accum 0 bitset 1 // Mark as moving followspline 0 wp_076 80 wait length -64 accum 0 bitreset 1 // Mark as not moving trigger tank_upgrades fire_exit trigger self move_increment } // Move from waypoint 077 trigger move_from_077 { accum 0 bitset 1 // Mark as moving followspline 0 wp_077 80 wait length -64 accum 0 bitreset 1 // Mark as not moving trigger self move_increment } // Move from waypoint 078 trigger move_from_078 { accum 0 bitset 1 // Mark as moving followspline 0 wp_078 80 wait length -64 accum 0 bitreset 1 // Mark as not moving trigger self move_increment } // Move from waypoint 079 trigger move_from_079 { accum 0 bitset 1 // Mark as moving followspline 0 wp_079 80 wait length -64 accum 0 bitreset 1 // Mark as not moving trigger self move_increment } // Move from waypoint 080 trigger move_from_080 { accum 0 bitset 1 // Mark as moving followspline 0 wp_080 80 wait length -64 accum 0 bitreset 1 // Mark as not moving trigger self move_increment } // Move from waypoint 081 trigger move_from_081 { accum 0 bitset 1 // Mark as moving followspline 0 wp_081 80 wait length -64 accum 0 bitreset 1 // Mark as not moving trigger self move_increment } // Move from waypoint 082 trigger move_from_082 { accum 0 bitset 1 // Mark as moving followspline 0 wp_082 80 wait length -64 accum 0 bitreset 1 // Mark as not moving trigger self move_increment } // Move from waypoint 083 trigger move_from_083 { accum 0 bitset 1 // Mark as moving followspline 0 wp_083 80 wait length -64 accum 0 bitreset 1 // Mark as not moving trigger self move_increment } // Move from waypoint 084 trigger move_from_084 { accum 0 bitset 1 // Mark as moving followspline 0 wp_084 80 wait length -64 accum 0 bitreset 1 // Mark as not moving trigger self move_increment } // Move from waypoint 085 trigger move_from_085 { accum 0 bitset 1 // Mark as moving followspline 0 wp_085 80 wait length -64 accum 0 bitreset 1 // Mark as not moving trigger self move_increment } // Move from waypoint 086 trigger move_from_086 { accum 0 bitset 1 // Mark as moving followspline 0 wp_086 80 wait length -64 accum 0 bitreset 1 // Mark as not moving trigger self move_increment } // Move from waypoint 087 trigger move_from_087 { accum 0 bitset 1 // Mark as moving followspline 0 wp_087 80 wait length -64 accum 0 bitreset 1 // Mark as not moving trigger self move_increment } // Move from waypoint 088 trigger move_from_088 { accum 0 bitset 1 // Mark as moving followspline 0 wp_088 80 wait length -64 accum 0 bitreset 1 // Mark as not moving trigger self move_increment } // Move from waypoint 089 trigger move_from_089 { accum 0 bitset 1 // Mark as moving followspline 0 wp_089 80 wait length -64 accum 0 bitreset 1 // Mark as not moving trigger self move_increment } // Move from waypoint 090 trigger move_from_090 { accum 0 bitset 1 // Mark as moving followspline 0 wp_090 80 wait length -64 accum 0 bitreset 1 // Mark as not moving trigger self move_increment } // Move from waypoint 091 trigger move_from_091 { accum 0 bitset 1 // Mark as moving followspline 0 wp_091 80 wait length -64 accum 0 bitreset 1 // Mark as not moving trigger at_gun_trigger range_bad trigger self move_increment } // Move from waypoint 092 trigger move_from_092 { accum 0 bitset 1 // Mark as moving followspline 0 wp_092 80 wait length -64 accum 0 bitreset 1 // Mark as not moving trigger self move_increment } // Move from waypoint 093 trigger move_from_093 { accum 0 bitset 1 // Mark as moving followspline 0 wp_093 80 wait length -64 accum 0 bitreset 1 // Mark as not moving trigger self move_increment } // Move from waypoint 094 trigger move_from_094 { accum 0 bitset 1 // Mark as moving followspline 0 wp_094 80 wait length -64 accum 0 bitreset 1 // Mark as not moving trigger self move_increment } // Move from waypoint 095 trigger move_from_095 { accum 0 bitset 1 // Mark as moving followspline 0 wp_095 80 wait length -64 accum 0 bitreset 1 // Mark as not moving trigger self move_increment } // Move from waypoint 096 trigger move_from_096 { accum 0 bitset 1 // Mark as moving followspline 0 wp_096 80 wait length -64 accum 0 bitreset 1 // Mark as not moving trigger self move_increment } // Move from waypoint 097 trigger move_from_097 { accum 0 bitset 1 // Mark as moving followspline 0 wp_097 80 wait length -64 accum 0 bitreset 1 // Mark as not moving trigger tank1 obstacle_004_added //End of Path. trigger self finale } trigger finale { // Lock script trigger self script_lock // Stop sound trigger tank1_sound stop // Stopping state trigger self anim_tracks_stop startanimation 45 10 15 nolerp norandom wait 666 // Stationary state startanimation 0 1 15 nolerp norandom trigger game_manager allies_objective_counter //Tank has blow depot gates // trigger self script_unlock } //////////////////////////////////////////////////////////////////////// // MOVE TO REPAIR DEPOT //////////////////////////////////////////////////////////////////////// // Move from waypoint 99 trigger move_from_99 { accum 0 bitset 1 // Mark as moving followspline 0 wp_99 80 wait length 64 accum 0 bitreset 1 // Mark as not moving trigger self move_increment } // Move from waypoint 100 trigger move_from_100 { accum 0 bitset 1 // Mark as moving followspline 0 wp_100 80 wait length 64 accum 0 bitreset 1 // Mark as not moving trigger self move_increment } // Move from waypoint 101 trigger move_from_101 { accum 0 bitset 1 // Mark as moving followspline 0 wp_101 80 wait length 64 accum 0 bitreset 1 // Mark as not moving trigger autofire_trigger miss trigger self move_increment } // Move from waypoint 102 trigger move_from_102 { accum 0 bitset 1 // Mark as moving followspline 0 wp_102 80 wait length 64 accum 0 bitreset 1 // Mark as not moving trigger self move_increment } // Move from waypoint 103 trigger move_from_103 { accum 0 bitset 1 // Mark as moving followspline 0 wp_103 80 wait length 64 accum 0 bitreset 1 // Mark as not moving trigger self move_increment } // Move from waypoint 104 trigger move_from_104 { accum 0 bitset 1 // Mark as moving followspline 0 wp_104 80 wait length 64 accum 0 bitreset 1 // Mark as not moving trigger self move_increment } // Move from waypoint 105 trigger move_from_105 { accum 0 bitset 1 // Mark as moving followspline 0 wp_105 80 wait length 64 accum 0 bitreset 1 // Mark as not moving trigger self move_increment } // Move from waypoint 106 trigger move_from_106 { accum 0 bitset 1 // Mark as moving followspline 0 wp_106 80 wait length 64 accum 0 bitreset 1 // Mark as not moving trigger self move_increment } // Move from waypoint 107 trigger move_from_107 { accum 0 bitset 1 // Mark as moving followspline 0 wp_107 80 wait length 64 accum 0 bitreset 1 // Mark as not moving trigger self move_increment trigger repair_door disable // Prevents door operation while tank is in the way } // Move from waypoint 108 trigger move_from_108 { accum 0 bitset 1 // Mark as moving followspline 0 wp_108 80 wait length 64 accum 0 bitreset 1 // Mark as not moving trigger self move_increment } // Move from waypoint 109 trigger move_from_109 { accum 0 bitset 1 // Mark as moving followspline 0 wp_109 80 wait length 64 accum 0 bitreset 1 // Mark as not moving trigger self move_increment } // Move from waypoint 110 trigger move_from_110 { accum 0 bitset 1 // Mark as moving followspline 0 wp_110 80 wait length 64 accum 0 bitreset 1 // Mark as not moving trigger self move_increment } // Move to waypoint 111 trigger move_from_111 { accum 0 bitset 1 // Mark as moving followspline 0 wp_111 80 wait length 64 accum 0 bitreset 1 // Mark as not moving trigger self obstacle_002_added //Tank is in repair position. Waiting for repairs. trigger self about_face } trigger about_face { // Lock script trigger self script_lock trigger self anim_tracks_turningleft faceangles 0 90 0 8000 // pitch yaw roll time(ms) // Stop sound trigger tank1_sound stop // Stopping state trigger self anim_tracks_stop startanimation 45 10 15 nolerp norandom wait 666 // Stationary state startanimation 0 1 15 nolerp norandom // Wait a little before setting additional conditions wait 100 trigger repair_door enable // Allows Repair Depot Doors to lower trigger repair_lock_trigger enable // Allows Tank Repair Locks to engage trigger vo_manager tank_esc_repdep_arrived_vo trigger self script_unlock trigger hint_arrow_green on } // Move from waypoint 112 trigger move_from_112 { accum 0 bitset 1 // Mark as moving followspline 0 wp_112 80 wait length 64 accum 0 bitreset 1 // Mark as not moving trigger self move_increment } //////////////////////////////////////////////////////////////////////// // Tank Returns to Fight //////////////////////////////////////////////////////////////////////// trigger giddyup { accum 2 set 200 // wm_announce "The Tank is Returning to Battle!" // trigger vo_manager tank_depot_esc_vo // trigger vo_manager tank_need_esc_vo trigger tank1 obstacle_002_removed //Tank has been repaired. Get moving trigger self mov_return } //////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////// // LEAVING REPAIR DEPOT //////////////////////////////////////////////////////////////////////// // Move from waypoint 200 trigger move_from_200 { accum 0 bitset 1 // Mark as moving followspline 0 wp_200 80 wait length 64 accum 0 bitreset 1 // Mark as not moving trigger self move_increment } // Move from waypoint 201 trigger move_from_201 { accum 0 bitset 1 // Mark as moving followspline 0 wp_201 80 wait length 64 accum 0 bitreset 1 // Mark as not moving trigger self move_increment } // Move from waypoint 202 trigger move_from_202 { accum 0 bitset 1 // Mark as moving followspline 0 wp_202 80 wait length 64 accum 0 bitreset 1 // Mark as not moving // trigger at_gun_trigger restored //If AT gun is not dead, set manual fire on trigger self move_increment } // Move from waypoint 203 trigger move_from_203 { accum 0 bitset 1 // Mark as moving followspline 0 wp_203 80 wait length 64 accum 0 bitreset 1 // Mark as not moving trigger self move_increment } // Move from waypoint 204 trigger move_from_204 { accum 0 bitset 1 // Mark as moving followspline 0 wp_204 80 wait length 64 accum 0 bitreset 1 // Mark as not moving trigger self move_increment } // Move from waypoint 205 trigger move_from_205 { accum 0 bitset 1 // Mark as moving followspline 0 wp_205 80 wait length 64 accum 0 bitreset 1 // Mark as not moving trigger autofire_trigger break trigger self move_increment } // Move from waypoint 206 trigger move_from_206 { accum 0 bitset 1 // Mark as moving followspline 0 wp_206 80 wait length 64 accum 0 bitreset 1 // Mark as not moving trigger self move_increment } // Move from waypoint 207 trigger move_from_207 { accum 0 bitset 1 // Mark as moving followspline 0 wp_207 80 wait length 64 accum 0 bitreset 1 // Mark as not moving trigger self move_increment } // Move from waypoint 208 trigger move_from_208 { accum 0 bitset 1 // Mark as moving followspline 0 wp_208 80 wait length 64 accum 0 bitreset 1 // Mark as not moving trigger self move_increment } // Move from waypoint 209 trigger move_from_209 { accum 0 bitset 1 // Mark as moving followspline 0 wp_209 80 wait length 64 accum 0 bitreset 1 // Mark as not moving trigger self move_increment } // Move from waypoint 210 trigger move_from_210 { accum 0 bitset 1 // Mark as moving followspline 0 wp_210 80 wait length 64 accum 0 bitreset 1 // Mark as not moving trigger at_gun_trigger range_ok trigger self move_increment } // Move from waypoint 211 trigger move_from_211 { accum 0 bitset 1 // Mark as moving followspline 0 wp_211 80 wait length 64 trigger self anim_tracks_turningright faceangles 0 360 0 4000 // pitch yaw roll time(ms) trigger self anim_tracks_forward accum 0 bitreset 1 // Mark as not moving trigger self move_caution } //////////////////////////////////////////////////////////////////////// //================================================================== // WAYPOINT CHECKS //================================================================== // Waypoint functions that checks if it can proceed to the next wp. //////////////////////////////////////////////////////////////////////// // CHECK DEATH // Check if its broken, and if so change to the broken state //////////////////////////////////////////////////////////////////////// trigger check_death { // Check if its broken accum 0 abort_if_not_bitset 0 // Abort if not broken accum 0 abort_if_bitset 1 // Abort if its already moving accum 0 abort_if_bitset 4 // Abort if its already in its broken state accum 9 abort_if_not_equal 0 // Abort if the script is currently locked // Lock script trigger self script_lock // This target_kill entity will kill the func_constructible so that an engineer can repair it alertentity tank1_kill // Change from fixed to broken model changemodel models/praetoria/ch_tank/ch_tank_brkn.md3 // Start smoking setstate tank1_smoke default // Death sound trigger self sound_death // Stopping state trigger self anim_tracks_stop startanimation 45 10 15 nolerp norandom wait 666 // Stationary state startanimation 0 1 15 nolerp norandom // Update state bits accum 0 bitset 4 // Mark as visually broken state //==================================================================================== wm_announce "The Tank has been damaged!" // *----------------------------------- vo ------------------------------------------* //==================================================================================== wm_teamvoiceannounce 0 "axis_hq_tank_damaged" wm_teamvoiceannounce 1 "allies_hq_tank_damaged_axis" wait 200 wm_addteamvoiceannounce 1 "allies_hq_tank_damaged_axis" wm_removeteamvoiceannounce 0 "axis_hq_tank_stop" // *---------------------------------------------------------------------------------* //==================================================================================== // Unlock script trigger self script_unlock } //////////////////////////////////////////////////////////////////////// // CHECK ESCORT // Check if tank is escorted, and if not then stop it //////////////////////////////////////////////////////////////////////// trigger check_escort { // Check if its not escorted accum 0 abort_if_bitset 2 // Abort if escort is present // Lock script trigger self script_lock // Stop sound trigger tank1_sound stop // Stopping state trigger self anim_tracks_stop startanimation 45 10 15 nolerp norandom wait 666 // Stationary state startanimation 0 1 15 nolerp norandom // Unlock script trigger self script_unlock } //////////////////////////////////////////////////////////////////////// // CHECK OBSTACLE // Check if there is an obstacle preventing it from continuing to the next wp, and if so then stop it //////////////////////////////////////////////////////////////////////// trigger check_obstacle { // Update obstacle bit (with the help of the wp counter and some of the obstacle functions) trigger self check_obstacle_status accum 0 abort_if_not_bitset 3 // Abort if no obstacles in the way // Lock script trigger self script_lock // Stop sound trigger tank1_sound stop // Stopping state trigger self anim_tracks_stop startanimation 45 10 15 nolerp norandom wait 666 // Stationary state startanimation 0 1 15 nolerp norandom // Unlock script trigger self script_unlock } //====================================================================== // OBSTACLE FUNCTIONS //====================================================================== // Dispatching obstacle checking function trigger check_obstacle_status { accum 0 bitreset 3 // Mark as no obstacles in the way // Choose the wp that occurs right before the obstacle. // Only checks for obstacles when it reaches the specified wp. accum 2 trigger_if_equal 16 tank1 obstacle_000_check //(If wp is equal to 16, AT Gun Check time) accum 2 trigger_if_equal 108 tank1 obstacle_001_check //(If wp is equal to 108, Is Repair Bay Door Lowered?) accum 2 trigger_if_equal 111 tank1 obstacle_002_check //(If wp is equal to 111, Is Tank at Repair postion?) accum 2 trigger_if_equal 202 tank1 obstacle_001_check //(If wp is equal to 202, Is Repair Bay Door Lowered?) accum 2 trigger_if_equal 55 tank1 obstacle_003_check //(If wp is equal to 54, check for out of fuel) accum 2 trigger_if_equal 81 tank1 obstacle_004_check //(If wp is equal to 81, check for end of route) } // ================================================ // ============ AUTOMATIC OBSTACLE ================ // ================================================ // AT GUN // Auto obstacle - Checks if the obstacle is blocking the way trigger obstacle_000_check { accum 1 abort_if_not_bitset 0 // Abort if the obstacle has been removed // wm_announce "The Tank encountered an obstacle" accum 0 bitset 3 // Mark as an obstacle in the way } // Auto obstacle - Add autfire AT gun as obstacle to alter tank route trigger obstacle_000_added { accum 1 bitset 0 // Mark obstacle as in the way } // Auto obstacle - Autofire AT gun no longer an obstacle trigger obstacle_000_removed { accum 1 bitreset 0 // Mark obstacle as removed } // ================================================ // ========== FIRST OBSTACLE ================== // ================================================ // REPAIR DEPOT DOOR // First obstacle - Checks if the obstacle is blocking the way trigger obstacle_001_check { accum 1 abort_if_not_bitset 1 // Abort if the obstacle has been removed // wm_announce "The Tank encountered an obstacle" accum 0 bitset 3 // Mark as an obstacle in the way } // First obstacle - Called by the "built final" routine in tank barrier entity, once the obstacle is constructed trigger obstacle_001_added { accum 1 bitset 1 // Mark obstacle as in the way } // First obstacle - Called by the death routine in another entity, once the obstacle is destroyed trigger obstacle_001_removed { accum 1 bitreset 1 // Mark obstacle as removed } // ================================================ // ========== SECOND OBSTACLE ===================== // ================================================ // REPAIR LOCK POSITION // SECOND obstacle - Checks if the obstacle is blocking the way trigger obstacle_002_check { accum 1 abort_if_not_bitset 2 // Abort if the obstacle has been removed // wm_announce "The Tank encountered an obstacle" accum 0 bitset 3 // Mark as an obstacle in the way } // SECOND obstacle - Called by the "built final" routine in tank barrier entity, once the obstacle is constructed trigger obstacle_002_added { accum 1 bitset 2 // Mark obstacle as in the way } // SECOND obstacle - Called by the death routine in another entity, once the obstacle is destroyed trigger obstacle_002_removed { accum 1 bitreset 2 // Mark obstacle as removed } // ================================================ // ========== THIRD OBSTACLE ===================== // ================================================ // OUT OF FUEL // Third obstacle - Checks if the obstacle is blocking the way trigger obstacle_003_check { accum 1 abort_if_not_bitset 3 // Abort if the obstacle has been removed // wm_announce "The Tank encountered an obstacle" accum 0 bitset 3 // Mark as an obstacle in the way } // Third obstacle - Called by the "built final" routine in tank barrier entity, once the obstacle is constructed trigger obstacle_003_added { accum 1 bitset 3 // Mark obstacle as in the way } // Third obstacle - Called by the death routine in another entity, once the obstacle is destroyed trigger obstacle_003_removed { accum 1 bitreset 3 // Mark obstacle as removed } // ================================================ // =========== FOURTH OBSTACLE ===================== // ================================================ // FOURTH obstacle - Called at the last wp to stop the tank trigger obstacle_004_check { accum 1 abort_if_not_bitset 4 // Abort if the obstacle has been removed // wm_announce "The Tank encountered an obstacle" accum 0 bitset 4 // Mark as an obstacle in the way } // FOURTH obstacle - Called by the "built final" routine in tank barrier entity, once the obstacle is constructed trigger obstacle_004_added { accum 1 bitset 4 // Mark obstacle as in the way } //////////////////////////////////////////////////////////////////////// //================================================================== // TANK SOUNDS //================================================================== //////////////////////////////////////////////////////////////////////// trigger sound_idle { stopsound playsound sound/vehicles/tank/tank_idle.wav looping volume 512 } trigger sound_start { stopsound playsound sound/vehicles/tank/tank_revup.wav volume 196 } trigger sound_move { stopsound playsound sound/vehicles/tank/tank_move.wav looping volume 512 } trigger sound_stop { stopsound playsound sound/vehicles/tank/tank_revdown.wav volume 196 } trigger sound_death { stopsound playsound sound/vehicles/tank/tank_stop.wav volume 256 } trigger sound_rebirth { stopsound playsound sound/vehicles/tank/tank_start.wav volume 196 } //////////////////////////////////////////////////////////////////////// //================================================================== // TANK ANIMATIONS //================================================================== //////////////////////////////////////////////////////////////////////// trigger anim_tracks_forward { remapshader models/praetoria/ch_tank/tracks_r models/praetoria/ch_tank/tracks_f remapshader models/mapobjects/tanks_sd/wheel_r models/mapobjects/tanks_sd/wheel_forward remapshader models/praetoria/ch_tank/tracks_l models/praetoria/ch_tank/tracks_f remapshader models/mapobjects/tanks_sd/wheel_l models/mapobjects/tanks_sd/wheel_forward remapshaderflush } trigger anim_tracks_reverse { remapshader models/praetoria/ch_tank/tracks_r models/praetoria/ch_tank/tracks_b remapshader models/mapobjects/tanks_sd/wheel_r models/mapobjects/tanks_sd/wheel_backward remapshader models/praetoria/ch_tank/tracks_l models/praetoria/ch_tank/tracks_b remapshader models/mapobjects/tanks_sd/wheel_l models/mapobjects/tanks_sd/wheel_backward remapshaderflush } trigger anim_tracks_turningleft { remapshader models/praetoria/ch_tank/tracks_r models/praetoria/ch_tank/tracks_f remapshader models/mapobjects/tanks_sd/wheel_r models/mapobjects/tanks_sd/wheel_forward remapshader models/praetoria/ch_tank/tracks_l models/praetoria/ch_tank/tracks_b remapshader models/mapobjects/tanks_sd/wheel_l models/mapobjects/tanks_sd/wheel_backward remapshaderflush } trigger anim_tracks_turningright { remapshader models/praetoria/ch_tank/tracks_r models/praetoria/ch_tank/tracks_b remapshader models/mapobjects/tanks_sd/wheel_r models/mapobjects/tanks_sd/wheel_backward remapshader models/praetoria/ch_tank/tracks_l models/praetoria/ch_tank/tracks_f remapshader models/mapobjects/tanks_sd/wheel_l models/mapobjects/tanks_sd/wheel_forward remapshaderflush } trigger anim_tracks_stop { remapshader models/praetoria/ch_tank/tracks_r models/praetoria/ch_tank/tracks_r remapshader models/mapobjects/tanks_sd/wheel_r models/mapobjects/tanks_sd/wheel_r remapshader models/praetoria/ch_tank/tracks_l models/praetoria/ch_tank/tracks_l remapshader models/mapobjects/tanks_sd/wheel_l models/mapobjects/tanks_sd/wheel_l remapshaderflush } trigger anim_fire_start { startanimation 67 8 10 nolerp norandom } trigger anim_fire_stop { startanimation 0 1 15 nolerp norandom } } // \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ // ||||||||||[ ATTATCHED TANK ENTITIES ]||||||||||||||||||||||||||||||||||| // /////////////////////////////////////////////////////////////////////////////////// // The following are related entities which are attached because they need to follow the script_mover tank1_enabler_trigger { spawn { // Wait for host entity to spawn wait 100 // Attaches itself to a tag on the script_mover attachtotag tank1 tag_turret } } tank1_flash { spawn { // Wait for host entity to spawn wait 200 // Attaches itself to a tag on the script_mover attachtotag tank1_turret tag_flash // Hides the flash setstate tank1_flash invisible } } tank1_smoke { spawn { // Wait for host entity to spawn wait 100 // Attaches itself to a tag on the script_mover attachtotag tank1 tag_turret // Turn off smoking alertentity tank1_smoke } } tank1_smoke2 { spawn { // Wait for host entity to spawn wait 100 // Attaches itself to a tag on the script_mover attachtotag tank1 tag_turret // Turn off smoking alertentity tank1_smoke2 } } tank1_explo { spawn { // Wait for host entity to spawn wait 100 // Attaches itself to a tag on the script_mover attachtotag tank1 tag_turret } } tank1_fx { spawn { // Wait for host entity to spawn wait 100 // Attaches itself to a tag on the script_mover attachtotag tank1 tag_turret // attachtotag tank1_turret tag_flash } } tank1_fire { spawn { // Wait for host entity to spawn wait 100 setstate tank1_fire invisible // Attaches itself to a tag on the script_mover attachtotag tank1 tag_turret } } tank1_firehurt { spawn { // Wait for host entity to spawn wait 100 setstate tank1_firehurt invisible // Attaches itself to a tag on the script_mover attachtotag tank1 tag_turret } } tank1_toi { spawn { // Wait for host entity to spawn wait 100 // Attaches itself to a tag on the script_mover attachtotag tank1 tag_turret } } // \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ // ||||||||||[ TANK UPGRADES ]||||||||||||||||||||||||||||||||||| // /////////////////////////////////////////////////////////////////////////////////// tank_upgrades { spawn { // Wait for host entity to spawn wait 100 accum 1 set 0 // Attaches itself to a tag on the script_mover attachtotag tank1 tag_turret setstate tank_upgrades invisible } trigger cov { setstate tank_upgrades default changemodel models/praetoria/up_tank/up_rig_1.md3 } trigger med { changemodel models/praetoria/up_tank/up_rig_2.md3 } trigger fop { changemodel models/praetoria/up_tank/up_rig_3.md3 } trigger sol { changemodel models/praetoria/up_tank/up_rig_4.md3 } trigger eng { remapshader "models/mapobjects/tanks_sd/mg42turret" "models/praetoria/up_tank/mgturret" remapshader "models/praetoria/ch_tank/body" "models/praetoria/up_tank/body" remapshaderflush } trigger fuel { changemodel models/praetoria/up_tank/up_rig_5.md3 } trigger fuel_l { changemodel models/praetoria/up_tank/up_rig_6.md3 } trigger fuel_r { changemodel models/praetoria/up_tank/up_rig_7.md3 } trigger disable { setstate tank_ammotrgr invisible setstate tank_healthtrgr invisible } trigger enable { setstate tank_ammotrgr default setstate tank_healthtrgr default } trigger fire { accum 1 abort_if_equal 1 accum 1 set 1 setstate tank_panzer_flash default setstate tank_panzer_killer default playsound sound/weapons/rocket/rocket_fire.wav wait 50 alertentity wall_north setstate tank_panzer_flash invisible setstate tank_panzer_killer invisible wait 500 setstate tank_panzer_flash default setstate tank_panzer_killer default playsound sound/weapons/rocket/rocket_fire.wav wait 50 alertentity gate_north setstate tank_panzer_flash invisible setstate tank_panzer_killer invisible wait 500 setstate tank_panzer_flash default setstate tank_panzer_killer default playsound sound/weapons/rocket/rocket_fire.wav wait 50 alertentity roof_north setstate tank_panzer_flash invisible setstate tank_panzer_killer invisible wait 500 setstate tank_panzer_flash default setstate tank_panzer_killer default playsound sound/weapons/rocket/rocket_fire.wav wait 50 alertentity roof_south setstate tank_panzer_flash invisible setstate tank_panzer_killer invisible wait 500 setstate tank_panzer_flash default setstate tank_panzer_killer default playsound sound/weapons/rocket/rocket_fire.wav wait 50 alertentity gate_south setstate tank_panzer_flash invisible setstate tank_panzer_killer invisible wait 500 setstate tank_panzer_flash default setstate tank_panzer_killer default playsound sound/weapons/rocket/rocket_fire.wav wait 50 alertentity wall_south setstate tank_panzer_flash invisible setstate tank_panzer_killer invisible wait 500 accum 1 set 0 } trigger fire_exit { accum 1 abort_if_equal 1 accum 1 set 1 setstate tank_panzer_flash default setstate tank_panzer_killer default playsound sound/weapons/rocket/rocket_fire.wav wait 50 alertentity exit setstate tank_panzer_flash invisible setstate tank_panzer_killer invisible wait 500 accum 1 set 0 } } tank_ammotrgr { spawn { // Wait for host entity to spawn wait 100 // Attaches itself to a tag on the script_mover attachtotag tank1 tag_turret setstate tank_ammotrgr invisible } } tank_healthtrgr { spawn { // Wait for host entity to spawn wait 100 // Attaches itself to a tag on the script_mover attachtotag tank1 tag_turret setstate tank_healthtrgr invisible } } // ================================================ // TANK PANZER // ================================================ tank_panzer_flash { spawn { // Wait for host entity to spawn wait 1000 // Attaches itself to a tag on the script_mover attachtotag tank_upgrades tag_barrel_cntr setstate tank_panzer_flash invisible } } tank_panzer_killer { spawn { // Wait for host entity to spawn wait 100 attachtotag tank1 tag_turret setstate tank_panzer_killer invisible } } // \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ // ||||||||||[ ADDITIONAL TANK ENTITIES ]||||||||||||||||||||||||||||||||||| // /////////////////////////////////////////////////////////////////////////////////// tank1_construct { spawn { // Needed for the icon to reappear correctly on the command map constructible_class 2 } // Called when the repairs are starting buildstart final { } // Called when the repairs have failed decayed final { } // Called when the repairs have failed failed { } // Called when the repairs are done built final { // Resurrect the entity. This fills up its health and trigger the ::rebirth function alertentity tank1 } } tank1_disabler { spawn { } trigger run { // Call the function which controls the escort timeout trigger tank1 timer } } tank1_enabler { spawn { } trigger run { // Call the function which handles the escort trigger tank1 escort_trigger } } tank1_kill { spawn { } } tank1_timer { spawn { } } // \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ // ||||||||||[ SOUND REDIRECTS ]||||||||||||||||||||||||||||||||||| // /////////////////////////////////////////////////////////////////////////////////// // This block contains sound redirectors. Since commands are executed in order, // the only way to have multiple waits at the same time is to play them // through another scriptblock //====================================================================== tank1_sound { spawn { } trigger start { trigger tank1 sound_start wait 3400 trigger tank1 sound_move } trigger stop { trigger tank1 sound_stop wait 1400 trigger tank1 sound_idle } trigger rebirth { trigger tank1 sound_rebirth wait 1400 trigger tank1 sound_idle } trigger turret_burn { trigger tank1_turret sound_burn } trigger turret_fire { trigger tank1_turret sound_fire } trigger turret_turn_start { trigger tank1_turret sound_turn_start } trigger turret_turn_stop { trigger tank1_turret sound_turn_stop } } // ============================================================================================= // ||||||||||||||||||||[ TANK TURRET ]||||||||||||||||||||||||||||||| // ============================================================================================= tank1_turret { spawn { // Wait for host entity to spawn wait 100 attachtotag tank1 tag_turret // Attaches itself to a tag on the script_mover } //---------------------------------------------------------------------- // TURRET FIRING SEQUENCES //---------------------------------------------------------------------- trigger fire_at_target_1 { // Wait a little until starting sequence wait 1000 // Turn turret towards target trigger tank1_sound turret_turn_start faceangles 0 270 0 4000 // Adjust angles to match the target trigger tank1_sound turret_turn_stop wait 500 // Fire at target trigger tank1_sound turret_fire trigger tank1 anim_fire_start setstate tank1_flash default wait 50 setstate tank1_flash invisible wait 200 trigger tank1 anim_fire_stop // BUG: Apparently the entitys scriptblock is completely removed after its blown up the first time trigger target_01 blow_up wait 3000 trigger vo_manager tunnel_doors_vo //Play VO for target destroyed wait 50 // Turn turret back to target trigger tank1_sound turret_turn_start faceangles 0 0 0 4000 trigger tank1_sound turret_turn_stop // Wait a little until its ready to move again wait 500 // Unlock script trigger tank1 script_unlock } trigger fire_at_target_2 { // Wait a little until starting sequence wait 1000 // Turn turret towards target trigger tank1_sound turret_turn_start faceangles 0 90 0 4000 // Adjust angles to match the target trigger tank1_sound turret_turn_stop wait 500 // Fire at target trigger tank1_sound turret_fire trigger tank1 anim_fire_start setstate tank1_flash default wait 50 setstate tank1_flash invisible wait 200 trigger tank1 anim_fire_stop // BUG: Apparently the entitys scriptblock is completely removed after its blown up the first time trigger target_02 blow_up wait 2000 trigger vo_manager axis_defenses_destroyed_vo // Turn turret back to target trigger tank1_sound turret_turn_start faceangles 0 0 0 4000 trigger tank1_sound turret_turn_stop // Wait a little until its ready to move again wait 500 trigger autofire_trigger run // globalaccum 5 trigger_if_equal 1 tank1 all_clear2 //If AT gun has blow, skip to short route } trigger fire_at_target_3 { // Wait a little until starting sequence wait 1000 // Turn turret towards target trigger tank1_sound turret_turn_start faceangles 0 285 0 4000 // Adjust angles to match the target trigger tank1_sound turret_turn_stop wait 500 // Fire at target trigger tank1_sound turret_fire trigger tank1 anim_fire_start setstate tank1_flash default wait 50 setstate tank1_flash invisible wait 200 trigger tank1 anim_fire_stop // BUG: Apparently the entitys scriptblock is completely removed after its blown up the first time trigger target_03 blow_up wait 3000 trigger vo_manager depot_gates_vo //Play VO for target destroyed // Set objective Status wm_set_main_objective 3 0 wm_set_main_objective 3 1 wm_objective_status 1 1 1 wm_objective_status 1 0 2 wait 50 // trigger courtyard_check flag_show //turns on capturable flag wait 50 // Turn turret back to target trigger tank1_sound turret_turn_start faceangles 0 0 0 4000 trigger tank1_sound turret_turn_stop // Wait a little until its ready to move again wait 500 // Unlock script trigger tank1 script_unlock } // ============================================================================================= // ||||||||||||||||||||[ TURRET SOUNDS ]||||||||||||||||||||||||||||||| // ============================================================================================= trigger sound_fire { stopsound playsound sound/vehicles/tank/tank_fire.wav volume 300 } trigger sound_turn_start { stopsound playsound sound/vehicles/tank/turret_spin.wav looping volume 127 } trigger sound_turn_stop { stopsound playsound sound/vehicles/tank/turret_end.wav volume 96 } trigger sound_burn { stopsound playsound looping sound/praetoria_m2/fire.wav volume 127 } } // ============================================================================================= // ||||||||||||||||||||[ TURRET TARGETS ]||||||||||||||||||||||||||||||| // ============================================================================================= // // Slot Used for // ==== ======== // 0 State: // - Bit 0: Broken 0 = No 1 = Yes // //////////////////////////////// // TARGET 1: Tunnel Doors //////////////////////////////// target_01 { spawn { // Reset state bits accum 0 bitset 0 // Mark as not blown up } pain { } // If you need to notify other parts of the script that the target has been removed, then do it here. death { } // Called when the entity should be destroyed trigger blow_up { // Check if we have already been blown up accum 0 abort_if_not_bitset 0 // Abort if already blown up // Update state bits accum 0 bitreset 0 // Mark as blown up // Blow up alertentity target_01 } } //////////////////////////////// // TARGET 2: Anti-Tank Gun = MISS //////////////////////////////// target_02 { spawn { // Reset state bits accum 0 bitset 0 // Mark as not blown up // setstate target_02_static invisible //door chunks } pain { } // If you need to notify other parts of the script that the target has been removed, then do it here. death { // setstate target_02_static default //door chunks } // Called when the entity should be destroyed trigger blow_up { // Check if we have already been blown up accum 0 abort_if_not_bitset 0 // Abort if already blown up // Update state bits accum 0 bitreset 0 // Mark as blown up // Blow up alertentity target_02 } } //////////////////////////////// // TARGET 3: DEPOT YARD DOORS //////////////////////////////// target_03 { spawn { // Reset state bits accum 0 bitset 0 // Mark as not blown up // setstate target_03_static invisible //door chunks } pain { } // If you need to notify other parts of the script that the target has been removed, then do it here. death { } // Called when the entity should be destroyed trigger blow_up { // Check if we have already been blown up accum 0 abort_if_not_bitset 0 // Abort if already blown up // Update state bits accum 0 bitreset 0 // Mark as blown up // Blow up alertentity target_03 } } // \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ // ||||||||||[ TANK SCRIPT END ]||||||||||||||||||||||||||||||||||| // /////////////////////////////////////////////////////////////////////////////////// // \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ // ||||||||||[ VOICE SCRIPTING ]||||||||||||||||||||||||||||||||||| // /////////////////////////////////////////////////////////////////////////////////// vo_manager { trigger axis_defenses_destroyed_vo { //==================================================================================== wm_announce "Gun Control Defenses Destroyed!" // *----------------------------------- vo ------------------------------------------* //==================================================================================== wait 200 wm_teamvoiceannounce 0 "axis_defense_destroyed" wm_teamvoiceannounce 0 "axis_controls_defend" wm_teamvoiceannounce 1 "allies_defense_destroyed" wm_teamvoiceannounce 1 "allies_controls_dyn" // *---------------------------------------------------------------------------------* //==================================================================================== } trigger oops_vo { // *----------------------------------- vo ------------------------------------------* //==================================================================================== wait 200 wm_teamvoiceannounce 1 "allies_oops" // *---------------------------------------------------------------------------------* //==================================================================================== } trigger fire_gun_vo { // *----------------------------------- vo ------------------------------------------* //==================================================================================== wait 200 wm_teamvoiceannounce 0 "axis_atgun_fire" // *---------------------------------------------------------------------------------* //==================================================================================== } trigger tunnel_doors_vo { //==================================================================================== wm_announce "The Tank has breached the Bunker Tunnel Doors!" // *----------------------------------- vo ------------------------------------------* //==================================================================================== wait 200 wm_teamvoiceannounce 0 "axis_tunnel_destroyed" wm_teamvoiceannounce 1 "allies_tunnel_destroyed" // *---------------------------------------------------------------------------------* //==================================================================================== } trigger atgun_past_vo { //==================================================================================== wm_announce "The Tank is past the Anti Tank Gun!" // *----------------------------------- vo ------------------------------------------* //==================================================================================== wait 200 wm_teamvoiceannounce 0 "axis_atgun_past" wm_teamvoiceannounce 1 "allies_atgun_past" wait 200 wm_removeteamvoiceannounce 0 "axis_atgun_defend" wm_removeteamvoiceannounce 1 "allies_atgun_dyn" // *---------------------------------------------------------------------------------* //==================================================================================== } trigger turret_killed_vo { //==================================================================================== wm_announce "^1WARNING: ^3The Tank Turret has been Destroyed!" // *----------------------------------- vo ------------------------------------------* //==================================================================================== wm_teamvoiceannounce 0 "axis_tankgun_dest" wm_teamvoiceannounce 1 "axis_tankgun_dest" // *---------------------------------------------------------------------------------* //==================================================================================== } trigger tank_killed_vo { //==================================================================================== // *----------------------------------- vo ------------------------------------------* //==================================================================================== wait 200 wm_teamvoiceannounce 0 "axis_tank_dest" wm_teamvoiceannounce 1 "axis_tank_dest" // *---------------------------------------------------------------------------------* //==================================================================================== } trigger g_con_built_vo { //==================================================================================== // *----------------------------------- vo ------------------------------------------* //==================================================================================== wait 200 wm_teamvoiceannounce 0 "axis_controls_repaired" wm_teamvoiceannounce 1 "allies_controls_repaired" wm_teamvoiceannounce 1 "allies_controls_dyn" wm_addteamvoiceannounce 1 "allies_controls_dyn" wm_addteamvoiceannounce 0 "axis_controls_defend" wm_removeteamvoiceannounce 0 "axis_controls_build" // *---------------------------------------------------------------------------------* //==================================================================================== } trigger g_con_damaged_vo { //==================================================================================== // *----------------------------------- vo ------------------------------------------* //==================================================================================== wait 200 wm_teamvoiceannounce 0 "axis_controls_destroyed" wm_teamvoiceannounce 1 "allies_controls_destroyed" wm_removeteamvoiceannounce 0 "axis_controls_defend" wm_removeteamvoiceannounce 1 "allies_controls_dyn" trigger vo_manager g_con_rebuild_vo // *---------------------------------------------------------------------------------* //==================================================================================== } trigger g_con_rebuild_vo { //==================================================================================== // *----------------------------------- vo ------------------------------------------* //==================================================================================== wait 200 wm_teamvoiceannounce 0 "axis_controls_build" wm_addteamvoiceannounce 0 "axis_controls_build" // *---------------------------------------------------------------------------------* //==================================================================================== } trigger tank_need_repair { // *----------------------------------- vo ------------------------------------------* //==================================================================================== wait 200 wm_teamvoiceannounce 1 "tank_repair_need" // *---------------------------------------------------------------------------------* //==================================================================================== } trigger tank_need_covops_vo { //==================================================================================== // *----------------------------------- vo ------------------------------------------* //==================================================================================== wait 200 wm_teamvoiceannounce 1 "tank_covops_need" // *---------------------------------------------------------------------------------* //==================================================================================== } trigger tank_need_medic_vo { //==================================================================================== // *----------------------------------- vo ------------------------------------------* //==================================================================================== wait 200 wm_teamvoiceannounce 1 "tank_medic_need" // *---------------------------------------------------------------------------------* //==================================================================================== } trigger tank_need_fops_vo { //==================================================================================== // *----------------------------------- vo ------------------------------------------* //==================================================================================== wait 200 wm_teamvoiceannounce 1 "tank_fops_need" // *---------------------------------------------------------------------------------* //==================================================================================== } trigger tank_need_sol_vo { //==================================================================================== // *----------------------------------- vo ------------------------------------------* //==================================================================================== wait 200 wm_teamvoiceannounce 1 "tank_sol_need" // *---------------------------------------------------------------------------------* //==================================================================================== } trigger tank_need_eng_vo { //==================================================================================== // *----------------------------------- vo ------------------------------------------* //==================================================================================== wait 200 wm_teamvoiceannounce 1 "tank_eng_need" // *---------------------------------------------------------------------------------* //==================================================================================== } trigger tank_need_esc_vo { //==================================================================================== // *----------------------------------- vo ------------------------------------------* //==================================================================================== wait 200 wm_teamvoiceannounce 1 "tank_esc_need" // *---------------------------------------------------------------------------------* //==================================================================================== } trigger tank_esc_repdep_vo { //==================================================================================== wm_announce "^1WARNING: ^3The Tank Turret has been Destroyed!" // *----------------------------------- vo ------------------------------------------* //==================================================================================== wm_teamvoiceannounce 0 "axis_tankgun_dest" wm_teamvoiceannounce 1 "axis_tankgun_dest" //==================================================================================== wait 2000 wm_announce "^3Escort the Tank to the Repair Depot!" // *----------------------------------- vo ------------------------------------------* //==================================================================================== wait 200 wm_teamvoiceannounce 1 "allies_tank_esc_repdep" wm_addteamvoiceannounce 1 "allies_tank_esc_repdep" wm_removeteamvoiceannounce 0 "axis_tank_gates" wm_removeteamvoiceannounce 1 "allies_tank_gates" wm_removeteamvoiceannounce 1 "allies_tank_esc1" // *---------------------------------------------------------------------------------* //==================================================================================== } trigger tank_esc_repdep_arrived_vo { //==================================================================================== // *----------------------------------- vo ------------------------------------------* //==================================================================================== wait 200 wm_removeteamvoiceannounce 1 "allies_tank_esc_repdep" // *---------------------------------------------------------------------------------* //==================================================================================== } trigger tank_reinforce { //==================================================================================== wait 100 wm_announce "^3Upgrade the Tank" // *----------------------------------- vo ------------------------------------------* //==================================================================================== wait 200 wm_teamvoiceannounce 0 "axis_tank_reinforce_stop" wm_teamvoiceannounce 1 "allies_tank_reinforce" wm_addteamvoiceannounce 0 "axis_tank_reinforce_stop" wm_addteamvoiceannounce 1 "allies_tank_reinforce" // *---------------------------------------------------------------------------------* //==================================================================================== } trigger tank_reinforced { //==================================================================================== wm_announce "^2Tank Upgrade Complete!!!" // *----------------------------------- vo ------------------------------------------* //==================================================================================== wait 200 wm_removeteamvoiceannounce 1 "allies_tank_reinforce" wm_teamvoiceannounce 1 "allies_tank_reinforced" wm_teamvoiceannounce 0 "axis_tank_reinforced" wm_removeteamvoiceannounce 0 "axis_tank_reinforce_stop" wait 200 wm_teamvoiceannounce 1 "bto_2" wm_teamvoiceannounce 0 "bto_2" wait 500 // *---------------------------------------------------------------------------------* //==================================================================================== } trigger tank_depot_esc_vo { //==================================================================================== // *----------------------------------- vo ------------------------------------------* //==================================================================================== wait 200 wm_teamvoiceannounce 0 "axis_tank_gates" wm_teamvoiceannounce 1 "allies_tank_gates" wm_addteamvoiceannounce 0 "axis_tank_gates" wm_addteamvoiceannounce 1 "allies_tank_gates" wm_removeteamvoiceannounce 1 "allies_tank_esc_repdep" wm_removeteamvoiceannounce 1 "allies_tank_esc1" // *---------------------------------------------------------------------------------* //==================================================================================== } trigger fire_stop { //==================================================================================== // *----------------------------------- vo ------------------------------------------* //==================================================================================== wait 500 wm_teamvoiceannounce 1 "allies_gunfire_stop" wm_teamvoiceannounce 0 "axis_fire_gun" // *---------------------------------------------------------------------------------* //==================================================================================== } trigger depot_gates_vo { //==================================================================================== wm_announce "The Tank has Destroyed The Depot Gates!" // *----------------------------------- vo ------------------------------------------* //==================================================================================== wait 200 wm_teamvoiceannounce 0 "axis_gates_dest" wm_teamvoiceannounce 1 "allies_gates_dest" wm_removeteamvoiceannounce 0 "axis_tank_gates" wm_removeteamvoiceannounce 0 "axis_tank_stop1" wm_removeteamvoiceannounce 1 "allies_tank_gates" wm_removeteamvoiceannounce 1 "allies_tank_esc1" wm_removeteamvoiceannounce 1 "allies_tank_esc_repdep" trigger self rear_objectives_vo // *---------------------------------------------------------------------------------* //==================================================================================== } trigger rear_objectives_vo { //==================================================================================== wm_announce "^3Get the Fuel Tanks!" // *----------------------------------- vo ------------------------------------------* //==================================================================================== wait 200 wm_teamvoiceannounce 0 "axis_fuel_def" wm_teamvoiceannounce 1 "allies_fuel_get" wm_addteamvoiceannounce 0 "axis_fuel_def" wm_addteamvoiceannounce 1 "allies_fuel_get" // *---------------------------------------------------------------------------------* //==================================================================================== } trigger final_objective_vo { //==================================================================================== wm_announce "The Allies are escaping with the Fuel!" // *----------------------------------- vo ------------------------------------------* //==================================================================================== wait 200 wm_teamvoiceannounce 0 "axis_tank_stop2" wm_teamvoiceannounce 1 "allies_tank_esc2" wm_addteamvoiceannounce 0 "axis_tank_stop2" wm_addteamvoiceannounce 1 "allies_tank_esc2" wm_removeteamvoiceannounce 0 "axis_fuel_def" wm_removeteamvoiceannounce 1 "allies_fuel_get" // *---------------------------------------------------------------------------------* //==================================================================================== } } // \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ // ||||||||||||||||||||[ PRAETORIA: MISSION TWO ]||||||||||||||||||||||||||||||||||| // ///////////////////////////////////////////////////////////////////////////////////////////// // praetoria_two.SCRIPT (Best viewing for this text document is 1280x1024.) // Author: Diego (Initial script created using EB's prefab script). // (Tank Upgrade and AT Gun scripting by Diego) // (Initial Churchill Tank scripting from Chruker's tank tutorial. Modifed, reorganized and annotated by Diego) // (Steal Objective Scripting By Splashdamage from the map Goldrush.) // (Spawn Exchange scripting - Xenon) // (Warmup script fix - Qualmi) // (See the readme file for any additional credits) // // \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ // ||||||||||||||||||||[ OBJECTIVES INFO ]||||||||||||||||||||||||||||||||||| // ///////////////////////////////////////////////////////////////////////////////////////////// // Allied Objectives // Primaries: // 1: Use the Tank to breach the Depot Gates. // 2: Reinforce the Tank and the Tank Repair Depot. // 3: Steal the Fuel for the Tank. // 4: Escape through the Tunnel that leads to the Airfield. // Secondaries: // 5: Destroy the Side Entrance. // 6: Destroy the Side Wall. // 7: Destroy the Gun Controls. // 8: Build a Command Post. // Axis Objectives // Primaries: // 1: Stop the Allies from breaching the Depot Gates. // 2: Don't let the Allies reinforce the Tank at the Repair Depot. // 3: Protect the Fuel. // 4: Stop the Tank from reaching the Airfield Tunnel // Secondaries: // 5: Defend the Side Entrance. // 6: Protect the Side Wall. // 7: Protect the Gun Controls // 8: Build a Command Post. // Spawns on Praetoria: Hell On Wheels // Main Bunker (Allied Only) // Forward Bunker (Capturable) // Main Entrance (Axis Only) // Global Accums in Use: // globalaccum 0 = Gun Controls State // globalaccum 1 = Fire Countdown State // \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ // ||||||||||||||||||||[ MAIN SCRIPT ]||||||||||||||||||||||||||||||||||| // ///////////////////////////////////////////////////////////////////////////////////////////// game_manager { spawn { //==================================================================================== //ACCUM SETTINGS //==================================================================================== accum 1 set 0 //Allied Objectives completed accum 2 set 0 //Axis Objectives completed //==================================================================================== //==================================================================================== //GAME RULES //==================================================================================== wm_axis_respawntime 20 //20 wm_allied_respawntime 15 //15 wm_number_of_objectives 8 //Should match number of objectives in OBJDATA file. wm_set_round_timelimit 30 //Time Limit wm_set_defending_team 0 //Stopwatch mode defending team (0=Axis, 1=Allies) wm_setwinner 0 //Winner on expiration of round timer (0=Axis, 1=Allies) //==================================================================================== //TEMPORARY CHARGE TIMES FOR TESTING //==================================================================================== // setchargetimefactor 0 soldier 0 // setchargetimefactor 0 medic 0 // setchargetimefactor 0 engineer 0 // setchargetimefactor 0 fieldops 0 // setchargetimefactor 0 covertops 0 // setchargetimefactor 1 soldier 0 // setchargetimefactor 1 medic 0 // setchargetimefactor 1 engineer 0 // setchargetimefactor 1 fieldops 0 // setchargetimefactor 1 covertops 0 //==================================================================================== //==================================================================================== //OBJECTIVES //==================================================================================== // Objective overview status indicators // wm_objective_status wm_objective_status 1 1 0 //Breach the Depot Defenses with the Tank wm_objective_status 1 0 0 wm_objective_status 2 1 0 //Reinforce the tank. wm_objective_status 2 0 0 wm_objective_status 3 1 0 //Steal the Fuel. wm_objective_status 3 0 0 wm_objective_status 4 1 0 //Escape to the Tunnel Exit. wm_objective_status 4 0 0 wm_objective_status 5 1 0 //Destroy Side Entrance. wm_objective_status 5 0 0 wm_objective_status 6 1 0 //Destroy Side Wall. wm_objective_status 6 0 0 wm_objective_status 7 1 2 //Protect the Gun Controls wm_objective_status 7 0 1 wm_objective_status 8 1 0 //Build a CP. wm_objective_status 8 0 0 //==================================================================================== wait 150 //==================================================================================== //REMAP SHADERS //==================================================================================== //Shader remaping for the Churchill Tank for temperate climate remapshader "models/mapobjects/tanks_sd/mg42turret" "models/praetoria/ch_tank/mgturret" remapshaderflush //==================================================================================== //==================================================================================== //AUTO SPAWN (0 = AXIS, 1 = ALLIES) //==================================================================================== setautospawn "Forward Bunker" 0 setautospawn "Forward Bunker" 1 //==================================================================================== wait 2000 //==================================================================================== //STARTING ENTITY SETUP //==================================================================================== trigger tank1 obstacle_000_added //AT Gun Obstacle to force tank to alter route. trigger tank1 obstacle_001_added //Repair Depot Doors are lowered. Tank Can't move past. //==================================================================================== trigger self intro } trigger intro { abortifwarmup wm_announce "^2Version 1.11!" //Script version wait 500 //==================================================================================== //STARTING VOICE COMMANDS //==================================================================================== // *---------------------------------------------------------------------------------* togglespeaker start wait 1000 wm_teamvoiceannounce 0 "axis_tank_stop1" wm_teamvoiceannounce 1 "allies_tank_esc1" wm_teamvoiceannounce 0 "axis_hq_compost_construct" wm_teamvoiceannounce 1 "allies_hq_compost_construct" wm_addteamvoiceannounce 0 "axis_tank_stop1" wm_addteamvoiceannounce 1 "allies_tank_esc1" wm_addteamvoiceannounce 0 "axis_hq_compost_construct" wm_addteamvoiceannounce 1 "allies_hq_compost_construct" // *---------------------------------------------------------------------------------* //==================================================================================== } //======================================================================================= // ||||||||||||||||||||[ AT_GUN FIRING ABILITY ]|||||||||||||||||||||||||||||||||| //======================================================================================= trigger fire_countdown { globalaccum 0 abort_if_not_bitset 1 wm_announce "^1WARNING: ^3Operational Tank Detected!!" globalaccum 1 abort_if_not_equal 1 wait 200 globalaccum 1 abort_if_not_equal 1 wait 200 globalaccum 1 abort_if_not_equal 1 wait 200 globalaccum 1 abort_if_not_equal 1 wait 200 globalaccum 1 abort_if_not_equal 1 wait 200 globalaccum 0 abort_if_not_bitset 2 // wm_announce "^1WARNING: ^3Tank is in Range!!" globalaccum 1 abort_if_not_equal 1 wait 200 globalaccum 1 abort_if_not_equal 1 wait 200 globalaccum 1 abort_if_not_equal 1 wait 200 globalaccum 1 abort_if_not_equal 1 wait 200 globalaccum 1 abort_if_not_equal 1 wait 200 globalaccum 0 abort_if_not_bitset 0 // wm_announce "^1WARNING: ^3AT Gun Reloading!!" togglespeaker at_gun_prep globalaccum 1 abort_if_not_equal 1 wait 200 globalaccum 1 abort_if_not_equal 1 wait 200 globalaccum 1 abort_if_not_equal 1 wait 200 globalaccum 1 abort_if_not_equal 1 wait 200 globalaccum 1 abort_if_not_equal 1 wait 200 globalaccum 1 abort_if_not_equal 1 wm_announce "^1WARNING: ^3Fire the AT Gun!!" trigger at_gun_trigger fire_ok } //======================================================================================= // ||||||||||||||||||||[ VICTORY SCRIPTING ]|||||||||||||||||||||||||||||||||||||| //======================================================================================= //ALLIED VICTORY trigger allies_objective_counter //Counts allied objectives completed { accum 1 inc 1 trigger game_manager checkgame_allies } trigger checkgame_allies { accum 1 abort_if_not_equal 1 wm_setwinner 1 wait 1000 wm_endround } //AXIS VICTORY trigger axis_objective_counter //Counts axis objectives completed { accum 2 inc 1 trigger game_manager checkgame_axis } trigger checkgame_axis { accum 2 abort_if_not_equal 1 wm_setwinner 0 wait 2000 togglespeaker tpir wait 4000 wm_endround } //======================================================================================= } // \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ // ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| // ///////////////////////////////////////////////////////////////////////////////////////////// // \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ // ||||||||||||||||[ MISC SCRIPTS ]|||||||||||||||||||||||||||||| // ///////////////////////////////////////////////////////////////////////////////////////////// // Kill zone for players in electrical area or in front of 6 shooter on tank. gibber { trigger humiliate { wm_teamvoiceannounce 0 "humiliation" wm_teamvoiceannounce 1 "humiliation" } } // Manual script tester. //tester //{ // trigger test_run // { // // //trigger >eventname> // wm_announce "Manually running script" // trigger game_manager gun_counter_add // //trigger >eventname> // } //} // \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ // ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| // ///////////////////////////////////////////////////////////////////////////////////////////// // \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ // ||||||||||||||||[ DESTRUCTIBLE OBJECTIVES ]|||||||||||||||||||||||||||||| // ///////////////////////////////////////////////////////////////////////////////////////////// //Side Entrance sidedoor { spawn { wait 200 constructible_class 3 // Dynamite only } death { wm_objective_status 5 1 1 wm_objective_status 5 0 2 //==================================================================================== wm_announce "The Allies have destroyed the Side Entrance!!" // *----------------------------------- vo ------------------------------------------* //==================================================================================== wm_teamvoiceannounce 0 "axis_entrance2_destroyed" wm_teamvoiceannounce 1 "allies_entrance2_destroyed" // *---------------------------------------------------------------------------------* //==================================================================================== //==================================================================================== } } //Side Wall sidewall { spawn { wait 200 constructible_class 3 // Dynamite only } death { wm_objective_status 6 1 1 wm_objective_status 6 0 2 //==================================================================================== wm_announce "The Allies have destroyed the Side Wall!!" // *----------------------------------- vo ------------------------------------------* //==================================================================================== wm_teamvoiceannounce 0 "axis_sidewall_destroyed" wm_teamvoiceannounce 1 "allies_sidewall_breached" // *---------------------------------------------------------------------------------* //==================================================================================== } } //Six Shooter Targets gate_north { spawn { wait 200 } } gate_south { spawn { wait 200 } } wall_north { spawn { wait 200 } } wall_south { spawn { wait 200 } } roof_north { spawn { wait 200 } } roof_south { spawn { wait 200 } } // \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ // ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| // ///////////////////////////////////////////////////////////////////////////////////////////// // \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ // ||||||||||||||||||||[ STEAL FUEL OBJECTIVES ]|||||||||||||||||||||||||||||||||| // ///////////////////////////////////////////////////////////////////////////////////////////// //Fuel Dropoff TOI Entity fueltank_dropoff { death { trigger tank1 add_fueltank } } //Fuel Pickup Entity fuel_tank { spawn { accum 0 set 0 // gold counter } trigger stolen { accum 0 inc 1 accum 0 trigger_if_equal 1 fuel_tank stolen1 accum 0 trigger_if_equal 2 fuel_tank stolen2 } trigger secured { accum 0 trigger_if_equal 1 fuel_tank secured1 accum 0 trigger_if_equal 2 fuel_tank secured2 } trigger returned { accum 0 inc -1 accum 0 trigger_if_equal 0 fuel_tank returned1 accum 0 trigger_if_equal 1 fuel_tank returned2 } trigger stolen1 { // *----------------------------------- vo ------------------------------------------* wm_teamvoiceannounce 0 "axis_fuel1_taken" wm_teamvoiceannounce 1 "allies_fuel1_taken" // *----------------------------------- vo ------------------------------------------* } trigger stolen2 { // *----------------------------------- vo ------------------------------------------* wm_teamvoiceannounce 0 "axis_fuel2_taken" wm_teamvoiceannounce 1 "allies_fuel2_taken" // *----------------------------------- vo ------------------------------------------* } trigger secured1 { wm_announce "Allied team has secured the first Fuel Tank!" // *----------------------------------- vo ------------------------------------------* wm_teamvoiceannounce 0 "axis_fuel1_secured" wm_teamvoiceannounce 1 "allies_fuel1_secured" // *---------------------------------------------------------------------------------* } trigger secured2 { wm_announce "Allied team has secured the second Fuel Tank!" // *----------------------------------- vo ------------------------------------------* wm_teamvoiceannounce 0 "axis_fuel2_secured" wm_teamvoiceannounce 1 "allies_fuel2_secured" wm_removeteamvoiceannounce 0 "axis_fuel_defend" wm_removeteamvoiceannounce 1 "allies_fuel_get" // *---------------------------------------------------------------------------------* } trigger returned1 { // *----------------------------------- vo ------------------------------------------* wm_teamvoiceannounce 0 "axis_fuel1_returned" wm_teamvoiceannounce 1 "allies_fuel1_returned" // *----------------------------------- vo ------------------------------------------* } trigger returned2 { // *----------------------------------- vo ------------------------------------------* wm_teamvoiceannounce 0 "axis_fuel2_returned" wm_teamvoiceannounce 1 "allies_fuel2_returned" // *----------------------------------- vo ------------------------------------------* } } // \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ // ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| // ///////////////////////////////////////////////////////////////////////////////////////////// // \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ // ||||||||||||||||[ ANTI TANK GUN ]||||||||||||||||||||||||||||||||||| // ///////////////////////////////////////////////////////////////////////////////////////////// // ================================================ // AT GUN Entities // ================================================ //AT gun Script Mover at_gun { spawn { wait 10 gotomarker gun_loc 50000 faceangles 0 350 0 5000 accum 2 set 0 //Which flash and effects 0= right 1= left } trigger face_right { stopsound playsound sound/movers/motors/motor_start_01.wav volume 512 stopsound playsound sound/movers/motors/motor_loop_01.wav looping volume 512 faceangles 0 275 0 2000 stopsound playsound sound/movers/motors/motor_end_01.wav 512 } trigger face_left { stopsound playsound sound/movers/motors/motor_start_01.wav volume 512 stopsound playsound sound/movers/motors/motor_loop_01.wav looping volume 512 faceangles 0 350 0 2000 stopsound playsound sound/movers/motors/motor_end_01.wav 521 } trigger flash_check { accum 2 trigger_if_equal 0 at_gun flash_right accum 2 trigger_if_equal 1 at_gun flash_left } trigger flash_right { setstate at_gun_flash default togglespeaker at_gun_fire alertentity at_gun_fx wait 100 setstate at_gun_flash invisible } trigger flash_left { setstate at_gun_flash2 default togglespeaker at_gun_fire alertentity at_gun_fx2 wait 100 setstate at_gun_flash2 invisible } trigger flash_switch { accum 2 set 1 trigger at_gun face_left } } //AT gun Muzzle Flashes at_gun_flash { spawn { wait 1000 // attachtotag at_gun tag_flash setstate at_gun_flash invisible } } at_gun_flash2 { spawn { wait 1000 // attachtotag at_gun tag_flash setstate at_gun_flash2 invisible } } //AT gun Muzzle Effects at_gun_fx { spawn { wait 1000 // attachtotag at_gun tag_flash } } at_gun_fx2 { spawn { wait 1000 // attachtotag at_gun tag_flash } } // ================================================ // AT GUN Auto Fire // ================================================ autofire_trigger { spawn { accum 1 set 0 } trigger run { accum 1 abort_if_equal 1 accum 1 set 1 togglespeaker autofire_alarm trigger at_gun face_right wait 3000 togglespeaker at_gun_on wait 150 trigger at_gun flash_check trigger at_gun_target damagecheck accum 1 set 0 } trigger miss { accum 1 abort_if_equal 1 accum 1 set 1 togglespeaker autofire_alarm wait 3000 togglespeaker at_gun_on wait 150 trigger at_gun flash_check trigger at_gun_target missed accum 1 set 0 } trigger break { accum 1 abort_if_equal 1 accum 1 set 1 togglespeaker autofire_alarm wait 3000 togglespeaker at_gun_break wait 200 togglespeaker at_gun_off wm_announce "^1WARNING: ^3Auto Fire Jammed! Switching to Manual Fire!!!" trigger gun_display_type manual trigger vo_manager fire_stop togglespeaker at_switch_on accum 1 set 0 } trigger destroyed { accum 1 abort_if_equal 1 accum 1 set 1 togglespeaker at_switch_on accum 1 set 0 } } // ================================================ // AT GUN Manual Fire // ================================================ // Slot Used for // ==== ======== // Global Accum 0 Gun Controls State: // - Bit 0: Gun Controls ok 0 = No 1 = Yes // - Bit 1: Tank Alive 0 = No 1 = Yes // - Bit 2: Tank In Range 0 = No 1 = Yes // Global Accum 1 Gun Controls Fire Countdown 0 = No 1 = Yes at_gun_trigger { spawn { wait 200 globalaccum 0 bitset 0 globalaccum 0 bitset 1 globalaccum 0 bitreset 2 globalaccum 1 set 0 //Gun Countdown Ready setstate at_gun_trigger invisible //Trigger Turned OFF } trigger status_check { globalaccum 0 abort_if_not_bitset 0 //wm_announce "status controls ok" globalaccum 0 abort_if_not_bitset 1 // wm_announce "status tank ok" globalaccum 0 abort_if_not_bitset 2 // wm_announce "status range ok" globalaccum 1 set 1 //ready to fire trigger game_manager fire_countdown } trigger revive { globalaccum 0 bitset 0 // - Bit 0: Gun Controls ok 0 = No 1 = Yes trigger at_gun_trigger status_check } trigger disabled { globalaccum 0 bitreset 0 // - Bit 0: Gun Controls ok 0 = No 1 = Yes globalaccum 1 trigger_if_equal 1 at_gun_trigger fire_dead //If Gun was ready to fire, switch off the fire ready state } trigger range_ok { //wm_announce "range_ok" globalaccum 0 bitset 2 // - Bit 2: Tank In Range 0 = No 1 = Yes trigger gun_display_range on trigger at_gun_trigger status_check } trigger range_bad { //wm_announce "range_bad" globalaccum 0 bitreset 2 // - Bit 2: Tank In Range 0 = No 1 = Yes globalaccum 1 trigger_if_equal 1 at_gun_trigger fire_bad //If Gun was ready to fire, switch off the fire ready state trigger gun_display_range off } trigger tank_ok { //wm_announce "tank_ok" globalaccum 0 bitset 1 // - Bit 1: Tank Alive 0 = No 1 = Yes trigger gun_display_tank on trigger at_gun_trigger status_check } trigger tank_bad { //wm_announce "tank_bad" globalaccum 0 bitreset 1 // - Bit 1: Tank Alive 0 = No 1 = Yes globalaccum 1 trigger_if_equal 1 at_gun_trigger fire_bad //If Gun was ready to fire, switch off the fire ready state trigger gun_display_tank off } trigger fire_ok { //wm_announce "fire ok" trigger g_con fire_on //Console Set to Fire setstate at_gun_trigger default //Trigger Turned On trigger vo_manager fire_gun_vo } trigger fire_bad { //wm_announce "fire bad" globalaccum 1 set 0 //Not Ready to Fire trigger g_con fire_off //Console not Set to Fire setstate at_gun_trigger invisible //Trigger Turned On } trigger fire_dead { // wm_announce "fire dead" globalaccum 1 set 0 //Not Ready to Fire trigger g_con fire_dead //Console not Set to Fire setstate at_gun_trigger invisible //Trigger Turned On } activate axis { globalaccum 1 abort_if_not_equal 1 trigger self fire } activate allies { togglespeaker at_switch_failed } trigger fire { wm_announce "^1WARNING: ^3AT Gun has been Fired Manually!!" //Warning message //switch sound togglespeaker at_gun_on togglespeaker at_switch_on wait 150 trigger at_gun flash_check //Choose direction and fire trigger at_gun_target damagecheck //Check Tank Damage } } // ================================================ // AT GUN TARGET // ================================================ //Accum 2: Tank Armour Status 0 = Start 1 = 100% 2 = 75% 3 = 50% 4 = 25% 5 = 0% at_gun_target { spawn { // Wait for host entity to spawn wait 200 accum 1 set 0 //script busy accum 2 set 0 //Front Armour status accum 3 set 0 //Switch Sides } trigger missed { alertentity wall_rock alertentity at_gun_miss } trigger switch_armour { accum 3 set 1 accum 2 inc 1 } trigger armour_inc_front { accum 2 inc 1 } trigger armour_inc_back { accum 2 inc 2 } trigger damagecheck { accum 1 abort_if_equal 1 accum 2 trigger_if_equal 0 at_gun_target damage_XX accum 2 trigger_if_equal 1 at_gun_target damage_90 accum 2 trigger_if_equal 2 at_gun_target damage_80 accum 2 trigger_if_equal 3 at_gun_target damage_70 accum 2 trigger_if_equal 4 at_gun_target damage_60 accum 2 trigger_if_equal 5 at_gun_target damage_50 accum 2 trigger_if_equal 6 at_gun_target damage_40 accum 2 trigger_if_equal 7 at_gun_target damage_30 accum 2 trigger_if_equal 8 at_gun_target damage_20 accum 2 trigger_if_equal 9 at_gun_target damage_10 accum 2 trigger_if_equal 10 at_gun_target damage_00 accum 2 trigger_if_equal 11 at_gun_target damage_end accum 2 trigger_if_equal 12 at_gun_target damage_end } trigger upgrade { wait 100 trigger vo_manager tank_reinforced accum 2 set 1 accum 4 set 2 } //---------------------------------------------------------------------- // TURRET DAMAGED STAGES //---------------------------------------------------------------------- //Auto fire damage setup trigger damage_XX { accum 1 abort_if_equal 1 accum 1 set 1 remapshader "models/praetoria/ch_tank/body" "models/praetoria/ch_tank/body_d" remapshaderflush alertentity tank1_fx alertentity tank1_fx alertentity tank1_fx alertentity tank1_fx alertentity tank1_explo alertentity tank1_smoke2 setstate tank1_fire default setstate tank1_firehurt default wait 500 // accum 2 set 5 //should be 5 by default 1 for testing all firing sequences trigger tank1 move_detour trigger vo_manager tank_esc_repdep_vo accum 1 set 0 } trigger damage_90 { accum 1 abort_if_equal 1 accum 1 set 1 wm_announce "^1Warning: ^2Tank Armour at 90 percent effectiveness!" alertentity tank1_fx alertentity tank1_fx alertentity tank1_fx alertentity tank1_fx alertentity tank1_explo wait 500 accum 3 trigger_if_equal 0 at_gun_target armour_inc_front accum 3 trigger_if_equal 1 at_gun_target armour_inc_back accum 1 set 0 } trigger damage_80 { accum 1 abort_if_equal 1 accum 1 set 1 togglespeaker manfire_alarm wm_announce "^1Warning: ^2Tank Armour at 80 percent effectiveness!" alertentity tank1_fx alertentity tank1_fx alertentity tank1_fx alertentity tank1_fx alertentity tank1_explo wait 500 accum 3 trigger_if_equal 0 at_gun_target armour_inc_front accum 3 trigger_if_equal 1 at_gun_target armour_inc_back accum 1 set 0 } trigger damage_70 { accum 1 abort_if_equal 1 accum 1 set 1 wm_announce "^1Warning: ^2Tank Armour at 70 percent effectiveness!" alertentity tank1_fx alertentity tank1_fx alertentity tank1_fx alertentity tank1_fx alertentity tank1_explo wait 500 accum 3 trigger_if_equal 0 at_gun_target armour_inc_front accum 3 trigger_if_equal 1 at_gun_target armour_inc_back accum 1 set 0 } trigger damage_60 { accum 1 abort_if_equal 1 accum 1 set 1 wm_announce "^1Warning: ^2Tank Armour at 60 percent effectiveness!" alertentity tank1_fx alertentity tank1_fx alertentity tank1_fx alertentity tank1_fx alertentity tank1_explo wait 500 accum 3 trigger_if_equal 0 at_gun_target armour_inc_front accum 3 trigger_if_equal 1 at_gun_target armour_inc_back accum 1 set 0 } trigger damage_50 { accum 1 abort_if_equal 1 accum 1 set 1 wm_announce "^1Warning: ^3Tank Armour at 50 percent effectiveness!" alertentity tank1_fx alertentity tank1_fx alertentity tank1_fx alertentity tank1_fx alertentity tank1_explo wait 500 accum 3 trigger_if_equal 0 at_gun_target armour_inc_front accum 3 trigger_if_equal 1 at_gun_target armour_inc_back accum 1 set 0 } trigger damage_40 { accum 1 abort_if_equal 1 accum 1 set 1 togglespeaker manfire_alarm wm_announce "^1Warning: ^3Tank Armour at 40 percent effectiveness!" alertentity tank1_fx alertentity tank1_fx alertentity tank1_fx alertentity tank1_fx alertentity tank1_explo wait 500 accum 3 trigger_if_equal 0 at_gun_target armour_inc_front accum 3 trigger_if_equal 1 at_gun_target armour_inc_back accum 1 set 0 } trigger damage_30 { accum 1 abort_if_equal 1 accum 1 set 1 togglespeaker manfire_alarm wm_announce "^1Warning: ^3Tank Armour at 30 percent effectiveness!" alertentity tank1_fx alertentity tank1_fx alertentity tank1_fx alertentity tank1_fx alertentity tank1_explo wait 500 accum 3 trigger_if_equal 0 at_gun_target armour_inc_front accum 3 trigger_if_equal 1 at_gun_target armour_inc_back accum 1 set 0 } trigger damage_20 { accum 1 abort_if_equal 1 accum 1 set 1 togglespeaker manfire_alarm wm_announce "^1Warning: ^3Tank Armour at 20 percent effectiveness!" alertentity tank1_fx alertentity tank1_fx alertentity tank1_fx alertentity tank1_fx alertentity tank1_explo wait 500 accum 3 trigger_if_equal 0 at_gun_target armour_inc_front accum 3 trigger_if_equal 1 at_gun_target armour_inc_back accum 1 set 0 } trigger damage_10 { accum 1 abort_if_equal 1 accum 1 set 1 togglespeaker manfire_alarm remapshader "models/mapobjects/tanks_sd/mg42turret" "models/praetoria/ch_tank/mgturret" remapshader "models/praetoria/ch_tank/body" "models/praetoria/ch_tank/body" remapshaderflush wm_announce "^1Warning: ^1Tank Armour at 10 percent effectiveness!" wm_announce "^1One more hit to the Rear Armour and the tank will be destroyed!!!" alertentity tank1_fx alertentity tank1_fx alertentity tank1_fx alertentity tank1_fx alertentity tank1_explo wait 500 accum 3 trigger_if_equal 0 at_gun_target armour_inc_front accum 3 trigger_if_equal 1 at_gun_target armour_inc_back accum 1 set 0 } trigger damage_00 { accum 1 abort_if_equal 1 accum 1 set 1 togglespeaker manfire_alarm remapshader "models/mapobjects/tanks_sd/mg42turret" "models/praetoria/ch_tank/mgturret" remapshader "models/praetoria/ch_tank/body" "models/praetoria/ch_tank/body" remapshaderflush wm_announce "^1Warning: ^1Tank Armour has been compromised!" wm_announce "^1One more hit and the tank will be destroyed!!!" alertentity tank1_fx alertentity tank1_fx alertentity tank1_fx alertentity tank1_fx alertentity tank1_explo wait 500 accum 3 trigger_if_equal 0 at_gun_target armour_inc_front accum 3 trigger_if_equal 1 at_gun_target armour_inc_back accum 1 set 0 } trigger damage_end { accum 1 abort_if_equal 1 accum 1 set 1 togglespeaker manfire_alarm wm_announce "^1MISSION FAILED: ^1The Tank has been destroyed!!!!" trigger vo_manager tank_killed_vo alertentity tank1_fx alertentity tank1_fx alertentity tank1_fx alertentity tank1_fx alertentity tank1_explo alertentity tank1_smoke2 setstate tank1_fire default setstate tank1_firehurt default remapshader "models/praetoria/ch_tank/mgturret" "textures/praetoria_m2/alpha/embers" remapshader "models/praetoria/ch_tank/body" "textures/praetoria_m2/alpha/embers" remapshaderflush trigger tank1 script_lock trigger at_gun_trigger disabled wait 500 trigger game_manager axis_objective_counter accum 1 set 0 } } // \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ // ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| // ///////////////////////////////////////////////////////////////////////////////////////////// // \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ // ||||||||||||||||[ CONTRUCTABLE OBJECTIVES ]|||||||||||||||||||||||||||||| // ///////////////////////////////////////////////////////////////////////////////////////////// // ================================================ // AT Gun Controls // ================================================ //============================================================================= //=== g_con Mapscript //============================================================================= g_con_smoke { spawn { wait 300 setstate g_con_smoke invisible } } // sound "thread" g_con_engine { spawn { accum 1 set 1 wait 200 trigger g_con_engine sound_idle } trigger sound_alarm_on { accum 1 set 0 enablespeaker manfire_alarm trigger self sound_alarm_loop } trigger sound_alarm_loop { accum 1 abort_if_equal 1 togglespeaker manfire_alarm wait 525 trigger self sound_alarm_loop } trigger sound_alarm_off { accum 1 set 1 //togglespeaker manfire_alarm disablespeaker manfire_alarm } trigger sound_rebirth { playsound sound/praetoria_m2/mech_rebirth.wav volume 128 trigger self sound_idle } trigger sound_idle { playsound sound/praetoria_m2/idle_alarm.wav looping volume 256 } trigger sound_pain { playsound sound/praetoria_m2/mech_pain.wav volume 256 } trigger sound_death { stopsound playsound sound/praetoria_m2/mech_death.wav volume 128 } // ======================================== } g_con_toi { spawn { wait 500 followspline 0 path_00 10000 wait length -64 } } g_con_construct { spawn { wait 100 constructible_class 3 // constructible_health 300 // constructible_chargebarreq 1.5 // constructible_constructxpbonus 10 // constructible_destructxpbonus 10 followspline 0 path_00 10000 wait length -64 } built final { alertentity g_con trigger g_con_engine sound_rebirth } } // script_mover //============================================================================= // accum 0, script lock // accum 1, current movement path position // accum 2, track state // accum 3, bit 0 death status (0=dead, 1=alive) // bit 4 temp register // bit 5 message-flag (0=no message, 1=message) // bit 6 visible state (0=alive, 1=dead) // accum 4, stop counter // g_con { spawn { wait 50 // constructible_chargebarreq 1.0 // constructible_constructxpbonus 10 // constructible_destructxpbonus 10 followspline 0 path_00 10000 wait length -64 } // ======================================== trigger script_lock { accum 0 inc 1 } trigger script_unlock { accum 0 inc -1 } trigger g_con_enable { accum 0 abort_if_not_equal 0 // are we not in a script lockout? accum 3 abort_if_bitset 0 // death check } trigger g_con_disable { trigger self deathcheck } trigger deathcheck { accum 3 abort_if_not_bitset 0 // are we dead? accum 3 abort_if_bitset 6 // are we not already visibly dead? accum 0 abort_if_not_equal 0 // are we not in a script lockout? accum 3 bitset 6 // we're now visibly dead accum 3 bitset 5 kill g_con_construct //Alert Constructable it is dead //==================================================================================== changemodel models/praetoria/consoles/at_con_dead.md3 //Dead Model trigger g_con_engine sound_death //Death Sound alertentity g_con_debris //Activate debris entity alertentity g_con_smoke //activate smoke entity //==================================================================================== trigger at_gun_trigger disabled //Turn off Trigger //==================================================================================== wm_announce "^1WARNING: ^3Manual Fire Control Damaged!!!" //warning message // *----------------------------------- vo ------------------------------------------* trigger vo_manager g_con_damaged_vo //Alert Players with VO //==================================================================================== wm_objective_status 7 1 1 //Controls destroyed wm_objective_status 7 0 2 resetscript } rebirth { accum 3 bitreset 6 // we're visibly alive accum 3 bitreset 0 // we're alive again //==================================================================================== alertentity g_con_smoke //turn off smoke //==================================================================================== trigger at_gun_trigger revive //Tell trigger you are rebuilt //==================================================================================== changemodel models/praetoria/consoles/at_con_load.md3 //Fixed Model trigger g_con_engine sound_rebirth //Sound power on //==================================================================================== //==================================================================================== wm_announce "^1WARNING: ^3Manual Fire Control Restored!!!" //warning message // *----------------------------------- vo ------------------------------------------* trigger vo_manager g_con_built_vo //Alert players with VO //==================================================================================== wm_objective_status 7 1 2 //Controls Rebuilt wm_objective_status 7 0 1 } pain { trigger g_con_engine sound_pain } death { accum 3 bitset 0 } trigger on { // wm_announce "gun controls on" changemodel models/praetoria/consoles/at_con_load.md3 trigger g_con_engine sound_idle } trigger fire_on { // wm_announce "gun controls fire" changemodel models/praetoria/consoles/at_con_fire.md3 trigger g_con_engine sound_alarm_on } trigger fire_off { // wm_announce "gun controls off" changemodel models/praetoria/consoles/at_con_load.md3 trigger g_con_engine sound_alarm_off } trigger fire_dead { // wm_announce "gun controls off" // changemodel models/praetoria/consoles/at_con_load.md3 trigger g_con_engine sound_alarm_off } // trigger dead // { // // wm_announce "gun controls dead" // trigger self sound_death // // trigger g_con_engine sound_alarm_off // } // ======================================== trigger run_continue { accum 1 inc 1 trigger self deathcheck } trigger move_to_0 { trigger self run_continue } } g_con_trigger { spawn { wait 500 } } g_con_disabler { trigger run { trigger g_con g_con_disable } } g_con_enabler { spawn { wait 500 followspline 0 path_00 10000 wait length -64 } trigger run { trigger g_con g_con_enable } } gun_display_type { spawn { wait 10 followspline 0 path_00 10000 wait length -64 } trigger auto { changemodel models/praetoria/displays/at_dis_auto.md3 } trigger manual { changemodel models/praetoria/displays/at_dis_man.md3 } } gun_display_tank { spawn { wait 10 followspline 0 path_00 10000 wait length -64 } trigger on { changemodel models/praetoria/displays/at_dis_t_on.md3 } trigger off { changemodel models/praetoria/displays/at_dis_t_off.md3 } } gun_display_range { spawn { wait 10 followspline 0 path_00 10000 wait length -64 } trigger on { changemodel models/praetoria/displays/at_dis_r_on.md3 } trigger off { changemodel models/praetoria/displays/at_dis_r_off.md3 } } // ================================================ // NEUTRAL COMMAND POST // ================================================ cp_allies_clip { spawn { wait 400 constructible_class 2 trigger self setup } trigger setup { setchargetimefactor 1 soldier 1 setchargetimefactor 1 lieutenant 1 setchargetimefactor 1 medic 1 setchargetimefactor 1 engineer 1 setchargetimefactor 1 covertops 1 sethqstatus 1 0 } buildstart final { trigger cp_model allies_construct } built final { trigger cp_model allies_built trigger cp_model enable_allied_features enablespeaker allies_compost_sound } decayed final { trigger cp_model neutral } death { trigger cp_model neutral trigger cp_model disable_allied_features disablespeaker allies_compost_sound } } cp_axis_clip { spawn { wait 400 constructible_class 2 trigger self setup } trigger setup { setchargetimefactor 0 soldier 1 setchargetimefactor 0 lieutenant 1 setchargetimefactor 0 medic 1 setchargetimefactor 0 engineer 1 setchargetimefactor 0 covertops 1 sethqstatus 0 0 } buildstart final { trigger cp_model axis_construct } built final { trigger cp_model axis_built trigger cp_model enable_axis_features enablespeaker axis_compost_sound } decayed final { trigger cp_model neutral } death { trigger cp_model neutral trigger cp_model disable_axis_features disablespeaker axis_compost_sound } } cp_model { spawn { wait 400 faceangles 0 180 0 5 } trigger axis_construct { changemodel models/praetoria/cp/cp_axis_open.md3 setstate cp_model underconstruction } trigger axis_built { changemodel models/praetoria/cp/cp_axis_open.md3 setstate cp_model default } trigger allies_construct { changemodel models/praetoria/cp/cp_allied_open.md3 setstate cp_model underconstruction } trigger allies_built { changemodel models/praetoria/cp/cp_allied_open.md3 setstate cp_model default } trigger neutral { changemodel models/praetoria/cp/cp_neutral_shut.md3 setstate cp_model default } trigger enable_allied_features { setchargetimefactor 1 soldier 0.75 setchargetimefactor 1 lieutenant 0.75 setchargetimefactor 1 medic 0.75 setchargetimefactor 1 engineer 0.75 setchargetimefactor 1 covertops 0.75 sethqstatus 1 1 wm_announce "Allied Command Post constructed. Forward Spawn Enabled!" // *----------------------------------- vo ------------------------------------------* wm_teamvoiceannounce 0 "axis_hq_compost_constructed_allies" wm_teamvoiceannounce 1 "allies_hq_compost_constructed" wm_removeteamvoiceannounce 1 "allies_hq_compost_construct" // *---------------------------------------------------------------------------------* wm_allied_respawntime 17 togglespeaker alliedhqsound trigger alliedcpspawns_obj on wm_objective_status 8 1 1 //Build a CP. wm_objective_status 8 0 2 } trigger disable_allied_features { setchargetimefactor 1 soldier 1 setchargetimefactor 1 lieutenant 1 setchargetimefactor 1 medic 1 setchargetimefactor 1 engineer 1 setchargetimefactor 1 covertops 1 sethqstatus 1 0 wm_announce "Axis team has destroyed the Allied Command Post!" // *----------------------------------- vo ------------------------------------------* wm_addteamvoiceannounce 0 "axis_hq_compost_construct" wm_addteamvoiceannounce 1 "allies_hq_compost_construct" wm_teamvoiceannounce 0 "axis_hq_compost_construct" wm_teamvoiceannounce 1 "allies_hq_compost_damaged" // *---------------------------------------------------------------------------------* wm_allied_respawntime 15 trigger alliedcpspawns_obj off togglespeaker alliedhqsound wm_objective_status 8 1 0 //Build a CP. wm_objective_status 8 0 0 } trigger enable_axis_features { setchargetimefactor 0 soldier 0.75 setchargetimefactor 0 lieutenant 0.75 setchargetimefactor 0 medic 0.75 setchargetimefactor 0 engineer 0.75 setchargetimefactor 0 covertops 0.75 sethqstatus 0 1 wm_announce "Axis Command Post constructed. Charge speed increased!" // *----------------------------------- vo ------------------------------------------* wm_teamvoiceannounce 0 "axis_hq_compost_constructed" wm_teamvoiceannounce 1 "allies_hq_compost_constructed_axis" wm_removeteamvoiceannounce 0 "axis_hq_compost_construct" // *---------------------------------------------------------------------------------* wm_axis_respawntime 18 togglespeaker axishqsound // trigger axiscpspawns_obj on wm_objective_status 8 1 2 //Build a CP. wm_objective_status 8 0 1 } trigger disable_axis_features { setchargetimefactor 0 soldier 1 setchargetimefactor 0 lieutenant 1 setchargetimefactor 0 medic 1 setchargetimefactor 0 engineer 1 setchargetimefactor 0 covertops 1 sethqstatus 0 0 wm_announce "Allied team has destroyed the Axis Command Post!" // *----------------------------------- vo ------------------------------------------* wm_addteamvoiceannounce 0 "axis_hq_compost_construct" wm_addteamvoiceannounce 1 "allies_hq_compost_construct" wm_teamvoiceannounce 0 "axis_hq_compost_damaged" wm_teamvoiceannounce 1 "allies_hq_compost_construct" // *---------------------------------------------------------------------------------* wm_axis_respawntime 20 //20 togglespeaker axishqsound wm_objective_status 8 1 0 //Build a CP. wm_objective_status 8 0 0 } } alliedcpspawns_obj { spawn { wait 50 setstate alliedcpspawns_obj invisible } trigger on { setstate alliedcpspawns_obj default setstate alliedcpspawns default } trigger off { setstate alliedcpspawns_obj invisible setstate alliedcpspawns invisible } } alliedcpspawns { spawn { wait 50 setstate alliedcpspawns invisible } } // \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ // ||||||||||||||||[ REPAIR DEPOT ]|||||||||||||||||||||||||||| // ///////////////////////////////////////////////////////////////////////////////////////////// // ================================================ // Repair Depot Door and Switch // ================================================ repair_door_zone { spawn { wait 100 } } repair_door_trigger { trigger switch { trigger repair_door switch } } repair_door { spawn { accum 1 set 0 accum 2 set 1 // 0 = doors open 1 = doors closed 2 = doors blocked } trigger switch { accum 1 abort_if_equal 1 accum 2 trigger_if_equal 0 repair_door close accum 2 trigger_if_equal 1 repair_door open accum 2 trigger_if_equal 2 repair_door failed } trigger open { accum 1 abort_if_equal 1 accum 1 set 1 wm_announce "^2The Repair Depot Door has been opened!" trigger repair_door_switch up playsound sound/movers/switches/butn2.wav wait 200 playsound sound/praetoria_m2/north_door.wav gotomarker repair_door_up 35 wait trigger tank1 obstacle_001_removed accum 2 set 0 accum 1 set 0 resetscript } trigger close { accum 1 abort_if_equal 1 accum 1 set 1 trigger tank1 obstacle_001_added wm_announce "^1The Repair Depot Door has been closed!" trigger repair_door_switch down playsound sound/movers/switches/butn2.wav wait 200 playsound sound/praetoria_m2/north_door.wav gotomarker repair_door_dn 35 wait accum 2 set 1 accum 1 set 0 resetscript } trigger failed { accum 1 abort_if_equal 1 accum 1 set 1 wm_announce "^3The Repair Depot Door is Blocked!" playsound sound/movers/switches/switch_01.wav accum 2 set 2 accum 1 set 0 resetscript } trigger disable { accum 2 set 2 setstate repair_door_zone invisible } trigger enable { accum 2 set 0 setstate repair_door_zone default } } repair_door_switch { spawn { } trigger up { gotomarker repair_switch_up 60 wait } trigger down { gotomarker repair_switch_dn 60 wait } } // ================================================ // Tank Repair Lock Switch // ================================================ msg_01_trigger { spawn { wait 100 setstate msg_01_trigger default //Repair Depot Locks are Empty } } msg_02_trigger { spawn { wait 100 setstate msg_02_trigger invisible //Repair Depot Locks are Busy } } repair_lock_trigger { spawn { accum 1 set 0 accum 2 set 3 // 0 = locks unlocked 1 = locks locked 2 = locks disabled 3 = locks empty accum 3 set 0 setstate repair_lock invisible } trigger tank_repaired { accum 3 set 0 printaccum 3 } trigger tank_disabled { accum 3 set 1 printaccum 3 } activate axis { accum 1 abort_if_equal 1 accum 2 trigger_if_equal 0 repair_lock_trigger failed accum 2 trigger_if_equal 1 repair_lock_trigger failed accum 2 trigger_if_equal 2 repair_lock_trigger failed accum 2 trigger_if_equal 3 repair_lock_trigger failed } activate allies { accum 1 abort_if_equal 1 accum 2 trigger_if_equal 0 repair_lock_trigger lock accum 2 trigger_if_equal 1 repair_lock_trigger unlock_check accum 2 trigger_if_equal 2 repair_lock_trigger failed accum 2 trigger_if_equal 3 repair_lock_trigger empty } trigger lock { accum 1 abort_if_equal 1 accum 1 set 1 accum 2 set 2 trigger repair_lock_switch down wm_announce "^1Tank Repair Locks Engaged!" wm_announce "^3Fire Suppression Commencing." trigger hint_arrow_green off setstate msg_01_trigger invisible setstate msg_02_trigger default setstate repair_lock default trigger self auto_repair } trigger auto_repair { wait 1000 //////////Extinguish Flames ///////////////////// trigger turret_repair fire_machine_enable alertentity fire_ext_smoke wait 5000 setstate tank1_fire invisible setstate tank1_firehurt invisible // alertentity tank1_firelight wait 2000 alertentity tank1_smoke2 wait 2000 wm_announce "^2Fire Suppression Complete." alertentity fire_ext_smoke wait 1000 trigger turret_repair fire_machine_disable ////////////////////////////////////////////////// wait 5000 //////////Activate Repair Crane ////////////////// trigger turret_repair repair_machine_enable wait 15000 trigger tank1 script_unlock remapshader "models/praetoria/ch_tank/body" "models/praetoria/ch_tank/body" remapshaderflush trigger tank1 script_lock wait 1000 trigger turret_repair repair_machine_disable wait 2000 //////////Activate Upgrade Center //////////////// trigger up_door_L open trigger up_door_R open wait 2000 trigger upgrade_sw_trigger enable ////////////////////VO and Hint///////////////////////// trigger vo_manager tank_reinforce wm_announce "^2Tank Repairs Complete!" // trigger self release } trigger release { // accum 1 abort_if_equal 1 // accum 1 set 1 trigger hint_arrow_green on setstate msg_01_trigger invisible // setstate msg_02_trigger invisible accum 2 set 1 accum 1 set 0 resetscript } trigger unlock { trigger repair_lock_switch up setstate repair_lock invisible trigger hint_arrow_green off trigger hint_arrow_white off setstate msg_01_trigger invisible setstate msg_02_trigger invisible trigger upgrade_sw_trigger disable trigger up_door_L close trigger up_door_R close accum 2 set 3 wait 3000 wm_announce "^2Locks Disengaged." wait 3000 wm_announce "The Tank is Returning to Battle!" trigger vo_manager tank_depot_esc_vo // trigger tank1 script_unlock wait 3000 trigger tank1 giddyup accum 1 set 0 resetscript } trigger failed_repair { trigger repair_lock_switch sound_error wm_announce "^2You must first repair the tank!" trigger vo_manager tank_repair accum 1 set 0 resetscript } trigger unlock_check { accum 1 abort_if_equal 1 accum 1 set 1 accum 3 trigger_if_equal 0 repair_lock_trigger unlock accum 3 trigger_if_equal 1 repair_lock_trigger failed_repair } trigger failed { accum 1 abort_if_equal 1 accum 1 set 1 trigger repair_lock_switch sound_error accum 1 set 0 resetscript } trigger failed_repair { trigger repair_lock_switch sound_error wm_announce "^2You must first repair the tank!" wm_announce_icon 1 "repair the tank" accum 1 set 0 resetscript } trigger empty { accum 1 abort_if_equal 1 accum 1 set 1 trigger repair_lock_switch sound_error accum 1 set 0 resetscript } trigger enable { accum 1 abort_if_equal 1 accum 1 set 1 setstate msg_01_trigger invisible setstate msg_02_trigger invisible accum 2 set 0 accum 1 set 0 resetscript } } // ================================================ // Turret Repair Machines // ================================================ turret_repair { spawn { wait 100 } //Fire Machine Code trigger fire_machine_enable { wait 100 setstate fire_light_off invisible setstate fire_light_on default alertentity fire_machine_speaker } trigger fire_machine_disable { wait 100 setstate fire_light_off default setstate fire_light_on invisible alertentity fire_machine_speaker } // Repair Machine Code trigger repair_machine_enable { wait 100 setstate repair_light_off invisible setstate repair_light_on default trigger arc_welder switch alertentity repair_machine_speaker } trigger repair_machine_disable { wait 100 setstate repair_light_off default setstate repair_light_on invisible alertentity repair_machine_speaker wait 200 trigger arc_welder switch } } fire_light_off { spawn { wait 100 setstate fire_light_off default } } fire_light_on { spawn { wait 100 setstate fire_light_on invisible } } repair_light_off { spawn { wait 100 setstate repair_light_off default } } repair_light_on { spawn { wait 100 setstate repair_light_on invisible } } arc_beam { spawn { wait 100 setstate arc_beam invisible setstate arc_beam_gibber invisible stopsound } trigger start { setstate arc_beam default setstate arc_beam_gibber default // togglespeaker arc_beam_speaker playsound sound/praetoria_m2/lg_hum.wav looping volume 1024 } trigger stop { setstate arc_beam invisible setstate arc_beam_gibber invisible // togglespeaker arc_beam_speaker stopsound } } arc_welder { spawn { wait 200 accum 1 set 0 accum 2 set 0 // 0 = welder up 1 = welder down } trigger switch { accum 1 abort_if_equal 1 accum 2 trigger_if_equal 0 arc_welder down accum 2 trigger_if_equal 1 arc_welder up } trigger down { accum 1 abort_if_equal 1 accum 1 set 1 wm_announce "^3Turret Welding Commencing" playsound sound/movers/motors/motor_loop_start.wav playsound sound/movers/motors/motor_loop_02.wav gotomarker arc_welder_dn 30 wait playsound sound/movers/motors/motor_loop_end.wav trigger arc_beam start accum 2 set 1 accum 1 set 0 resetscript } trigger up { accum 1 abort_if_equal 1 accum 1 set 0 wm_announce "^3Turret Welding Complete" trigger arc_beam stop wait 1000 playsound sound/movers/motors/motor_loop_start.wav playsound sound/movers/motors/motor_loop_02.wav gotomarker arc_welder_up 30 wait playsound sound/movers/motors/motor_loop_end.wav accum 2 set 0 accum 1 set 0 resetscript } } repair_lock_switch { spawn { } trigger up { playsound sound/praetoria_m2/locks_off.wav gotomarker repair_lock_switch_up 60 wait } trigger down { playsound sound/praetoria_m2/locks_on.wav gotomarker repair_lock_switch_dn 60 wait } trigger sound_error { playsound sound/movers/switches/switch_01.wav } } // \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ // ||||||||||||||||[ TANK UPGRADER ]|||||||||||||||||||||||||||| // ///////////////////////////////////////////////////////////////////////////////////////////// upgrade_console { spawn { wait 100 faceangles 0 90 0 5000 } trigger off { changemodel models/praetoria/consoles/up_con_off.md3 } trigger on { changemodel models/praetoria/consoles/up_con_on.md3 playsound sound/praetoria_m2/upgrade_end.wav //poweron } trigger interrupt { changemodel models/praetoria/consoles/up_con_on.md3 playsound sound/movers/switches/switch_01.wav //red/green light switch sound } trigger cov { changemodel models/praetoria/consoles/up_con_cov.md3 playsound sound/praetoria_m2/switch1.wav //red/green light switch sound } trigger med { changemodel models/praetoria/consoles/up_con_med.md3 playsound sound/praetoria_m2/switch2.wav //red/green light switch sound } trigger fop { changemodel models/praetoria/consoles/up_con_fop.md3 playsound sound/praetoria_m2/switch3.wav //red/green light switch sound } trigger sol { changemodel models/praetoria/consoles/up_con_sol.md3 playsound sound/praetoria_m2/switch4.wav //red/green light switch sound } trigger eng { changemodel models/praetoria/consoles/up_con_eng.md3 playsound sound/praetoria_m2/switch5.wav //red/green light switch sound } } upgrade_display { spawn { wait 100 faceangles 0 90 0 5000 } trigger off { changemodel models/praetoria/displays/up_dis_off.md3 } trigger on { changemodel models/praetoria/displays/up_dis_on.md3 } trigger cov { changemodel models/praetoria/displays/up_dis_cov.md3 } trigger med { changemodel models/praetoria/displays/up_dis_med.md3 } trigger fop { changemodel models/praetoria/displays/up_dis_fop.md3 } trigger sol { changemodel models/praetoria/displays/up_dis_sol.md3 } trigger eng { changemodel models/praetoria/displays/up_dis_eng.md3 } } // ================================================ // UNIFIED UPRADE CONSOLE ENTITIES // ================================================ // Accum 0 = Class choice 0= null, 1 = covy, 2 = med, 3= fop, 4 = sol, 5 = eng // Accum 1 = script busy accum // Accum 2 = Trigger interrupt: 0 = off, 1 = on upgrade_sw_trigger { spawn { accum 0 set 0 //Class choice accum 1 set 0 //script busy accum accum 2 set 0 //0 = off 1 = on wait 100 setstate upgrade_sw_trigger invisible } trigger nextclass { accum 0 inc 1 accum 2 set 0 } trigger enable { setstate upgrade_sw_trigger default //Turns on trigger entity trigger upgrade_console on trigger upgrade_display on trigger self nextclass } trigger disable { setstate upgrade_sw_trigger invisible //Turns ff trigger entity trigger upgrade_console off trigger upgrade_pad off } activate axis { accum 1 abort_if_equal 1 accum 2 trigger_if_equal 1 upgrade_sw_trigger stop } activate allies { accum 1 abort_if_equal 1 accum 2 trigger_if_equal 0 upgrade_sw_trigger start } trigger stop { accum 0 trigger_if_equal 1 upgrade_sw_trigger stop_cov accum 0 trigger_if_equal 2 upgrade_sw_trigger stop_med accum 0 trigger_if_equal 3 upgrade_sw_trigger stop_fop accum 0 trigger_if_equal 4 upgrade_sw_trigger stop_sol accum 0 trigger_if_equal 5 upgrade_sw_trigger stop_eng } trigger start { accum 0 trigger_if_equal 1 upgrade_sw_trigger start_cov accum 0 trigger_if_equal 2 upgrade_sw_trigger start_med accum 0 trigger_if_equal 3 upgrade_sw_trigger start_fop accum 0 trigger_if_equal 4 upgrade_sw_trigger start_sol accum 0 trigger_if_equal 5 upgrade_sw_trigger start_eng } trigger start_cov { accum 1 set 1 //Console Switch Activation trigger upgrade_console cov trigger upgrade_pad cov trigger hint_arrow_white on trigger vo_manager tank_need_covops_vo setstate cov_up_trigger default //Turns on Class specific upgrade pit trigger accum 2 set 1 accum 1 set 0 } trigger start_med { accum 1 set 1 //Console Switch Activation trigger upgrade_console med trigger upgrade_pad med trigger hint_arrow_white on trigger vo_manager tank_need_medic_vo setstate med_up_trigger default //Turns on Class specific upgrade pit trigger accum 2 set 1 accum 1 set 0 } trigger start_fop { accum 1 set 1 //Console Switch Activation trigger upgrade_console fop trigger upgrade_pad fop trigger hint_arrow_white on trigger vo_manager tank_need_fops_vo setstate fop_up_trigger default //Turns on Class specific upgrade pit trigger accum 2 set 1 accum 1 set 0 } trigger start_sol { accum 1 set 1 //Console Switch Activation trigger upgrade_console sol trigger upgrade_pad sol trigger hint_arrow_white on trigger vo_manager tank_need_sol_vo setstate sol_up_trigger default //Turns on Class specific upgrade pit trigger accum 2 set 1 accum 1 set 0 } trigger start_eng { accum 1 set 1 //Console Switch Activation trigger upgrade_console eng trigger upgrade_pad eng trigger hint_arrow_white on trigger vo_manager tank_need_eng_vo setstate eng_up_trigger default //Turns on Class specific upgrade pit trigger accum 2 set 1 accum 1 set 0 } trigger stop_cov { accum 1 set 1 //Console Switch Dectivation trigger upgrade_console interrupt trigger upgrade_pad on trigger hint_arrow_white off setstate cov_up_trigger invisible //Turns off Class specific upgrade pit trigger trigger upgrade_control reset accum 2 set 0 accum 1 set 0 } trigger stop_med { accum 1 set 1 //Console Switch Dectivation trigger upgrade_console interrupt trigger upgrade_pad on trigger hint_arrow_white off setstate med_up_trigger invisible //Turns off Class specific upgrade pit trigger trigger upgrade_control reset accum 2 set 0 accum 1 set 0 } trigger stop_fop { accum 1 set 1 //Console Switch Dectivation trigger upgrade_console interrupt trigger upgrade_pad on trigger hint_arrow_white off setstate fop_up_trigger invisible //Turns off Class specific upgrade pit trigger trigger upgrade_control reset accum 2 set 0 accum 1 set 0 } trigger stop_sol { accum 1 set 1 //Console Switch Dectivation trigger upgrade_console interrupt trigger upgrade_pad on trigger hint_arrow_white off setstate sol_up_trigger invisible //Turns off Class specific upgrade pit trigger trigger upgrade_control reset accum 2 set 0 accum 1 set 0 } trigger stop_eng { accum 1 set 1 //Console Switch Dectivation trigger upgrade_console interrupt trigger upgrade_pad on trigger hint_arrow_white off setstate eng_up_trigger invisible //Turns off Class specific upgrade pit trigger trigger upgrade_control reset accum 2 set 0 accum 1 set 0 } } // ================================================ // UNIFIED UPRADE CONTROL // ================================================ // Accum 1 = trigger firing counter // Accum 2 = Class choice 0= null, 1 = covy, 2 = med, 3= fop, 4 = sol, 5 = eng // Accum 3 = Sound firing counter upgrade_control { spawn { wait 100 accum 1 set 0 //trigger firing counter accum 2 set 1 //Class Type counter accum 3 set 0 //Sound firing counter } trigger reset { accum 1 set 0 accum 3 set 0 } trigger timer //Counts trigger firings { accum 1 inc 1 accum 3 inc 1 trigger self update_complete trigger self sound_counter wait 1000 } trigger sound_counter { accum 3 abort_if_not_equal 3 alertentity up_start_speaker accum 3 set 0 } trigger update_complete // Check to see if all of axis objectives are complete { accum 1 abort_if_not_equal 20 accum 2 trigger_if_equal 1 upgrade_control cov_upgrade accum 2 trigger_if_equal 2 upgrade_control med_upgrade accum 2 trigger_if_equal 3 upgrade_control fop_upgrade accum 2 trigger_if_equal 4 upgrade_control sol_upgrade accum 2 trigger_if_equal 5 upgrade_control eng_upgrade accum 2 inc 1 accum 1 set 0 } trigger cov_upgrade { //Audio and Visual Notifications of Upgrade Installation trigger upgrade_display cov alertentity up_complete_speaker wm_announce "^2Jamming Transmitter Installed!" //Set the new entity visible here. // trigger tank1 cov_install //tells tank the upgrade is installed trigger tank_upgrades cov //Switches on the upgrade rig //Turn off Covy Stuff setstate cov_up_trigger invisible //Turns off Class specific upgrade pit trigger trigger upgrade_sw_trigger nextclass //Advances counter to upgrade next class in line trigger upgrade_console on //Resets console to on version trigger upgrade_pad off //Resets upgrade pad to dark version } trigger med_upgrade { //Audio and Visual Notifications of Upgrade Installation trigger upgrade_display med alertentity up_complete_speaker wm_announce "^2First Aid Kit Installed!" //Set the entity visible here. trigger tank1 med_install //Tells tank medkit installed, check for enabling trigger tank_upgrades med //changes upgrade rig model //Turn off med Stuff setstate med_up_trigger invisible //Turns off Class specific upgrade pit trigger trigger upgrade_sw_trigger nextclass //Advances counter to upgrade next class in line trigger upgrade_console on //Resets console to on version trigger upgrade_pad off //Resets upgrade pad to dark version } trigger fop_upgrade { //Audio and Visual Notifications of Upgrade Installation trigger upgrade_display fop alertentity up_complete_speaker wm_announce "^2Ammo Supply Kit Installed!" //Set the entity visible here. trigger tank1 fop_install //Tells tank ammo installed, check for enabling trigger tank_upgrades fop //changes upgrade rig model //Turn off fop Stuff setstate fop_up_trigger invisible //Turns off Class specific upgrade pit trigger trigger upgrade_sw_trigger nextclass //Advances counter to upgrade next class in line trigger upgrade_console on //Resets console to on version trigger upgrade_pad off //Resets upgrade pad to dark version } trigger sol_upgrade { //Audio and Visual Notifications of Upgrade Installation trigger upgrade_display sol alertentity up_complete_speaker wm_announce "^2Six-Shooter Cannon Installed!" //Set the entity visible here. // trigger tank1 sol_install trigger tank_upgrades sol //changes upgrade rig model //Turn off sol Stuff setstate sol_up_trigger invisible //Turns off Class specific upgrade pit trigger trigger upgrade_sw_trigger nextclass //Advances counter to upgrade next class in line trigger upgrade_console on //Resets console to on version trigger upgrade_pad off //Resets upgrade pad to dark version } trigger eng_upgrade { //Audio and Visual Notifications of Upgrade Installation trigger upgrade_display eng alertentity up_complete_speaker wm_announce "^2Armour Upgrade Installed!" //Set the entity visible here. trigger tank_upgrades eng //remaps shaders // trigger tank1 eng_install trigger at_gun_target upgrade //So AT gun knows the armour is upgraded // Set Secondary objective status to complete wm_set_main_objective 1 0 wm_set_main_objective 1 1 wm_objective_status 2 1 1 wm_objective_status 2 0 2 //Turn off eng Stuff setstate eng_up_trigger invisible //Turns off Class specific upgrade pit trigger trigger upgrade_sw_trigger disable //Turns off upgrade console because no more upgrades are available. //Repair Lock activated wait 3000 trigger repair_lock_trigger release } } // ================================================ // UNIFIED UPRADE PIT ENTITIES // ================================================ upgrade_pad { spawn { wait 100 gotomarker hint_platform 500000 faceangles 0 -90 0 5000 } trigger on { changemodel models/praetoria/consoles/plat_on.md3 } trigger off { changemodel models/praetoria/consoles/plat_off.md3 } trigger cov { changemodel models/praetoria/consoles/plat_cov.md3 } trigger med { changemodel models/praetoria/consoles/plat_med.md3 } trigger fop { changemodel models/praetoria/consoles/plat_fop.md3 } trigger sol { changemodel models/praetoria/consoles/plat_sol.md3 } trigger eng { changemodel models/praetoria/consoles/plat_eng.md3 } } cov_up_trigger { spawn { wait 100 setstate cov_up_trigger invisible } } med_up_trigger { spawn { wait 100 setstate med_up_trigger invisible } } fop_up_trigger { spawn { wait 100 setstate fop_up_trigger invisible } } sol_up_trigger { spawn { wait 100 setstate sol_up_trigger invisible } } eng_up_trigger { spawn { wait 100 setstate eng_up_trigger invisible } } // ================================================ // Misc Entities // ================================================ // Upgrade Hint Arrows hint_arrow_green { spawn { wait 100 gotomarker hint_base 50000 wait } trigger on { gotomarker hint_lock 50000 wait } trigger off { gotomarker hint_base 50000 wait } } hint_arrow_white { spawn { wait 100 gotomarker hint_base 50000 wait } trigger on { gotomarker hint_platform 50000 wait } trigger off { gotomarker hint_base 50000 wait } } up_start_speaker { spawn { wait 100 } } up_complete_speaker { spawn { wait 100 } } // ================================================ // UNIFIED UPRADE PIT DOOR ENTITIES // ================================================ up_door_l { spawn { wait 100 } trigger open { accum 1 abort_if_equal 1 accum 0 abort_if_equal 1 accum 1 set 1 accum 0 set 1 wait 3000 playsound sound/movers/doors/door5_open.wav faceangles 180 0 0 1500 accum 0 set 0 } trigger close { accum 1 abort_if_equal 0 accum 0 abort_if_equal 1 accum 1 set 0 accum 0 set 1 wait 5000 playsound sound/movers/doors/door5_close.wav faceangles 0 0 0 1500 playsound sound/movers/doors/door5_endc.wav accum 0 set 0 } } up_door_r { spawn { wait 100 } trigger open { accum 1 abort_if_equal 1 accum 0 abort_if_equal 1 accum 1 set 1 accum 0 set 1 wait 3000 playsound sound/movers/doors/door5_open.wav faceangles -180 0 0 1500 accum 0 set 0 } trigger close { accum 1 abort_if_equal 0 accum 0 abort_if_equal 1 accum 1 set 0 accum 0 set 1 wait 5000 playsound sound/movers/doors/door5_close.wav faceangles 0 0 0 1500 playsound sound/movers/doors/door5_endc.wav accum 0 set 0 } } // \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ // ||||||||||[ TANK SCRIPT START ]||||||||||||||||||||||||||||||||||| // /////////////////////////////////////////////////////////////////////////////////// //====================================================================== // TANK SUMMARY //====================================================================== // // Slot Used for // ==== ======== // 0 Tank State: // - Bit 0: Broken 0 = No 1 = Yes // - Bit 1: Moving 0 = No 1 = Yes // - Bit 2: Escort present 0 = No 1 = Yes // - Bit 3: Obstacle in the way 0 = No 1 = Yes // - Bit 4: Model shown broken 0 = No 1 = Yes // 1 Path state: // - Bit 0: Obstacle #0 present 0 = No 1 = Yes (AT GUN now automatic barrier) // - Bit 1: Obstacle #1 present 0 = No 1 = Yes (Repair Depot Door up or down) // - Bit 2: Obstacle #2 present 0 = No 1 = Yes (At Repair Locks) // - Bit 3: Obstacle #3 present 0 = No 1 = Yes (Out of Fuel) // - Bit 4: Obstacle #4 present 0 = No 1 = Yes (End of Route) // 2 wp counter // 3 Stop timer // 4 Upgrade States: // - Bit 0: CovOps upgrade present 0 = No 1 = Yes // - Bit 1: Medic upgrade present 0 = No 1 = Yes // - Bit 2: Field Ops upgrade present 0 = No 1 = Yes // - Bit 3: Soldier upgrade present 0 = No 1 = Yes // - Bit 4: Engineer upgrade present 0 = No 1 = Yes // 5 How Many Fuel Tanks Added 0, 1, or 2 // 6 ***unused*** // 7 ***unused*** // 8 ***unused*** // 9 Script lockout counter // //======================================================================== tank1 { trigger fuel_on { setstate fueltank_dropoff default setstate fueltank_toi default setstate fueltank_cm_marker default trigger tank_upgrades fuel //turns on transparent fuel cans } trigger fuel_off { setstate fueltank_dropoff invisible setstate fueltank_toi invisible setstate fueltank_cm_marker invisible } trigger add_fueltank { accum 5 inc 1 trigger tank_upgrades fuel_l //turns on left upgraded fuel can trigger fuel_tank secured accum 5 abort_if_less_than 2 trigger tank_upgrades fuel_r //turns on right upgraded fuel can trigger vo_manager final_objective_vo wm_objective_status 3 0 2 wm_objective_status 3 1 1 wm_set_main_objective 4 0 wm_set_main_objective 4 1 trigger self fuel_off trigger self obstacle_003_removed } ////////////////////////////////////////////////////////////////////////// // ================================================ // ============ Tank Initialized ================== // ================================================ // Called at the start of the game to set Tank's initial state. spawn { // Set variables to defaults accum 0 set 0 // State accum 1 set 0 // Path state accum 1 bitreset 0 // Set obstacle 0 as not present accum 1 bitreset 1 // Set obstacle 1 as not present accum 1 bitreset 2 // Set obstacle 2 as not present accum 1 bitreset 3 // Set Track as not completed. accum 1 bitreset 4 // Set Fuel as Loaded // accum 4 bitreset 0 // COV upgrade not present accum 4 bitreset 1 // MED upgrade not present accum 4 bitreset 2 // FOP upgrade not present // accum 4 bitreset 3 // SOL upgrade not present // accum 4 bitreset 4 // ENG upgrade not present accum 3 set 0 // Timer Reset accum 9 set 0 // Reset script lockout counter // Wait for entities to spawn wait 100 // Set initial position to the first wp followspline 0 wp_000 10000 accum 2 set 1 // Set default state (ie. tank ready) trigger self sound_idle trigger self anim_tracks_stop setstate tank1_smoke invisible } //////////////////////////////////////////////////////////////////////// // ================================================ // ============ Upgrade Activation ================ // ================================================ // Called when a Tank Upgrade is completed or tank is damaged and repaired //////////////////////////////////////////////////////////////////////// // trigger cov_install // { // accum 4 bitset 0 // // setchargetimefactor 1 covertops 0.85 // } trigger med_install { accum 4 bitset 1 trigger self upgrade_enable // setchargetimefactor 1 medic 0.85 } trigger fop_install { accum 4 bitset 2 trigger self upgrade_enable // setchargetimefactor 1 fieldops 0.85 } // trigger sol_install // { // accum 4 bitset 3 // // setchargetimefactor 1 soldier 0.85 // } // trigger eng_install // { // accum 4 bitset 4 // // setchargetimefactor 1 engineer 0.85 // } trigger upgrade_enable { accum 0 abort_if_bitset 0 // trigger self cov_enable trigger self med_enable trigger self fop_enable // trigger self sol_enable // trigger self eng_enable } trigger upgrade_disable { accum 0 abort_if_not_bitset 0 // trigger self cov_disable trigger self med_disable trigger self fop_disable // trigger self sol_disable // trigger self eng_disable } // trigger cov_enable // { // accum 4 abort_if_not_bitset 0 // trigger tank_radio enable // // globalaccum 6 abort_if_not_equal 0 // // setchargetimefactor 1 covertops 0.85 // } trigger med_enable { accum 4 abort_if_not_bitset 1 setstate tank_healthtrgr default // globalaccum 6 abort_if_not_equal 0 // setchargetimefactor 1 medic 0.85 } trigger fop_enable { accum 4 abort_if_not_bitset 2 setstate tank_ammotrgr default // globalaccum 6 abort_if_not_equal 0 // setchargetimefactor 1 fieldops 0.85 } // trigger sol_enable // { // accum 4 abort_if_not_bitset 3 // trigger tank_panzer enable // // globalaccum 6 abort_if_not_equal 0 // // setchargetimefactor 1 soldier 0.85 // } // trigger eng_enable // { // accum 4 abort_if_not_bitset 4 // // globalaccum 6 abort_if_not_equal 0 // // setchargetimefactor 1 engineer 0.85 // } // trigger cov_disable // { // accum 4 abort_if_not_bitset 0 // trigger tank_radio disable // // globalaccum 6 abort_if_not_equal 0 // // setchargetimefactor 1 covertops 1 // } trigger med_disable { accum 4 abort_if_not_bitset 1 setstate tank_healthtrgr invisible // globalaccum 6 abort_if_not_equal 0 // setchargetimefactor 1 medic 1 } trigger fop_disable { accum 4 abort_if_not_bitset 2 setstate tank_ammotrgr invisible // globalaccum 6 abort_if_not_equal 0 // setchargetimefactor 1 fieldops 1 } // trigger sol_disable // { // accum 4 abort_if_not_bitset 3 // trigger tank_panzer disable // // globalaccum 6 abort_if_not_equal 0 // // setchargetimefactor 1 soldier 1 // } // trigger eng_disable // { // accum 4 abort_if_not_bitset 4 // // globalaccum 6 abort_if_not_equal 0 // // setchargetimefactor 1 engineer 1 // } //////////////////////////////////////////////////////////////////////// // ================================================ // ============ Tank Damaged ====================== // ================================================ // Called when the Tank entity is hurt //////////////////////////////////////////////////////////////////////// pain { } //////////////////////////////////////////////////////////////////////// // ================================================ // ============ Tank Disabled ===================== // ================================================ // Called when the Tank entity is disabled or destroyed //////////////////////////////////////////////////////////////////////// death { // Update state bits accum 0 bitset 0 // Mark as broken, which mean it will stop at next wp trigger repair_lock_trigger tank_disabled trigger self upgrade_disable trigger at_gun_trigger tank_bad } //////////////////////////////////////////////////////////////////////// // ================================================ // ============ Tank Repaired ===================== // ================================================ // Indirectly called when the entity is repaired //////////////////////////////////////////////////////////////////////// rebirth { // Lock script trigger self script_lock // Change from broken to fixed model changemodel models/praetoria/ch_tank/ch_tank.md3 // Remove smoke setstate tank1_smoke invisible //==================================================================================== wm_announce "The Tank has been Repaired!" // *----------------------------------- vo ------------------------------------------* //==================================================================================== wm_teamvoiceannounce 0 "axis_hq_tank_repaired_allies" wm_teamvoiceannounce 1 "allies_hq_tank_repaired" wait 200 //wm_addteamvoiceannounce 0 "axis_hq_tank_stop" wm_removeteamvoiceannounce 1 "allies_hq_tank_damaged_axis" // *---------------------------------------------------------------------------------* //==================================================================================== // Start trigger tank1_sound rebirth wait 500 // Update state bits accum 0 bitreset 0 // Mark as not broken accum 0 bitreset 4 // Mark as visually not broken // Unlock script trigger self script_unlock trigger self upgrade_enable trigger repair_lock_trigger tank_repaired trigger at_gun_trigger tank_ok // Tells AT Gun script that tank is repaired } //////////////////////////////////////////////////////////////////////// // ================================================ // ============ MG42 Setup ======================== // ================================================ // Called when a player is using the mounted MG //////////////////////////////////////////////////////////////////////// mg42 mount { } // Called when a player is no longer using the mounted MG mg42 unmount { } //////////////////////////////////////////////////////////////////////// //====================================================================== // SCRIPTLOCK FUNCTIONS //====================================================================== //////////////////////////////////////////////////////////////////////// trigger script_lock { accum 9 inc 1 } trigger script_unlock { accum 9 inc -1 } //////////////////////////////////////////////////////////////////////// //================================================================== // ESCORT SCRIPTING //================================================================== //////////////////////////////////////////////////////////////////////// // ESCORT TRIGGER // This function is called when a player moves inside the escort zone //////////////////////////////////////////////////////////////////////// trigger escort_trigger { // Check for obstacles trigger self check_obstacle_status // Update state bits and counters accum 0 bitset 2 // Mark as escort present accum 3 set 0 // Reset stop timer // Check if allowed to move accum 0 abort_if_bitset 0 // Abort if its broken accum 0 abort_if_bitset 1 // Abort if its already moving accum 0 abort_if_bitset 3 // Abort if an obstacle is in the way accum 1 abort_if_bitset 4 // Abort if end of line (this was 2) accum 9 abort_if_not_equal 0 // Abort if the script is currently locked // Lock script trigger self script_lock // Starting state trigger tank1_sound start startanimation 55 10 15 nolerp norandom wait 666 // Driving state trigger self anim_tracks_forward startanimation 5 40 15 nolerp norandom // Wait a bit before starting to move wait 500 // Unlock script trigger self script_unlock // Start movement loop trigger self move } //////////////////////////////////////////////////////////////////////// // ESCORT TIMER // This function is called periodicly by a func_timer entity in the map. // Each time it checks a counter to see if the escort has been gone too // long. The counter is reset by the escort trigger function. //////////////////////////////////////////////////////////////////////// trigger timer { // Increase counter, and if it hasn't reached 4 then abort accum 3 inc 1 accum 3 abort_if_less_than 4 // Update state bits accum 0 bitreset 2 // Mark as not escorted, which means it will stop at next wp // Need to periodicly check if the tank has been damaged trigger self check_death } //////////////////////////////////////////////////////////////////////// //====================================================================== // MOVE FUNCTIONS //====================================================================== //////////////////////////////////////////////////////////////////////// // MOVE INCREMENTS // Called at the end of each move. If it passes some checks the movement is repeated //////////////////////////////////////////////////////////////////////// trigger move_increment { accum 2 inc 1 // Increment wp counter // Check if its ok to proceed to the next wp trigger self check_death trigger self check_escort trigger self check_obstacle // This loop is used so that the tank can immediately advance after completing the move trigger self move } //////////////////////////////////////////////////////////////////////// // TANK DETOUR CHOICES //////////////////////////////////////////////////////////////////////// // trigger choose_path // { // globalaccum 5 trigger_if_equal 0 tank1 pistols_at_dawn // globalaccum 5 trigger_if_equal 1 tank1 all_clear // } // trigger move_assault // { // accum 2 set 17 // Increment wp counter // trigger self obstacle_000_removed //Remove AT Gun as an obstacle // Check if its ok to proceed to the next wp // trigger self check_death // trigger self check_escort // trigger self check_obstacle // This loop is used so that the tank can immediately advance after completing the move // trigger self move // } trigger move_detour { wait 5000 trigger self script_unlock accum 2 set 100 trigger self obstacle_000_removed //Remove AT Gun as an obstacle // Check if its ok to proceed to the next wp trigger self check_death trigger self check_escort trigger self check_obstacle // This loop is used so that the tank can immediately advance after completing the move trigger self move } trigger move_return { accum 2 set 200 // Increment wp counter // trigger self obstacle_000_removed //Remove AT Gun as an obstacle // Check if its ok to proceed to the next wp trigger self check_death trigger self check_escort trigger self check_obstacle // This loop is used so that the tank can immediately advance after completing the move trigger self move } trigger move_caution { accum 2 set 17 // Increment wp counter trigger self obstacle_000_removed //Remove AT Gun as an obstacle // Check if its ok to proceed to the next wp trigger self check_death trigger self check_escort trigger self check_obstacle // This loop is used so that the tank can immediately advance after completing the move trigger self move } //////////////////////////////////////////////////////////////////////// // MOVEMENT TRIGGERS //////////////////////////////////////////////////////////////////////// trigger move { // The obstacle bit is still valid because of the obstacle check done by the calling function accum 0 abort_if_bitset 3 // Abort if an obstacle is in the way //////////////////////////////////////////////////////////////////////// // FIRST STAGE MOVEMENT //////////////////////////////////////////////////////////////////////// accum 2 trigger_if_equal 1 tank1 move_from_001 accum 2 trigger_if_equal 2 tank1 move_from_002 accum 2 trigger_if_equal 3 tank1 move_from_003 accum 2 trigger_if_equal 4 tank1 move_from_004 accum 2 trigger_if_equal 5 tank1 move_from_005 //Destroy the Main Bunker Exit accum 2 trigger_if_equal 6 tank1 move_from_006 accum 2 trigger_if_equal 7 tank1 move_from_007 accum 2 trigger_if_equal 8 tank1 move_from_008 accum 2 trigger_if_equal 9 tank1 move_from_009 accum 2 trigger_if_equal 10 tank1 move_from_010 accum 2 trigger_if_equal 11 tank1 move_from_011 accum 2 trigger_if_equal 12 tank1 move_from_012 accum 2 trigger_if_equal 13 tank1 move_from_013 accum 2 trigger_if_equal 14 tank1 move_from_014 accum 2 trigger_if_equal 15 tank1 move_from_015 accum 2 trigger_if_equal 16 tank1 move_from_017 //Check AT Gun Status //////////////////////////////////////////////////////////////////////// // SECOND STAGE MOVEMENT //////////////////////////////////////////////////////////////////////// accum 2 trigger_if_equal 17 tank1 move_from_017 accum 2 trigger_if_equal 18 tank1 move_from_018 accum 2 trigger_if_equal 19 tank1 move_from_019 accum 2 trigger_if_equal 20 tank1 move_from_020 accum 2 trigger_if_equal 21 tank1 move_from_021 accum 2 trigger_if_equal 22 tank1 move_from_022 accum 2 trigger_if_equal 23 tank1 move_from_023 accum 2 trigger_if_equal 24 tank1 move_from_024 accum 2 trigger_if_equal 25 tank1 move_from_025 accum 2 trigger_if_equal 26 tank1 move_from_026 accum 2 trigger_if_equal 27 tank1 move_from_027 accum 2 trigger_if_equal 28 tank1 move_from_028 accum 2 trigger_if_equal 29 tank1 move_from_029 accum 2 trigger_if_equal 30 tank1 move_from_030 accum 2 trigger_if_equal 31 tank1 move_from_031 accum 2 trigger_if_equal 32 tank1 move_from_032 accum 2 trigger_if_equal 33 tank1 move_from_033 accum 2 trigger_if_equal 34 tank1 move_from_034 accum 2 trigger_if_equal 35 tank1 move_from_035 // Tank has crossed the bridge accum 2 trigger_if_equal 36 tank1 move_from_036 accum 2 trigger_if_equal 37 tank1 move_from_037 accum 2 trigger_if_equal 38 tank1 move_from_038 accum 2 trigger_if_equal 39 tank1 move_from_039 accum 2 trigger_if_equal 40 tank1 move_from_040 accum 2 trigger_if_equal 41 tank1 move_from_041 accum 2 trigger_if_equal 42 tank1 move_from_042 accum 2 trigger_if_equal 43 tank1 move_from_043 accum 2 trigger_if_equal 44 tank1 move_from_044 accum 2 trigger_if_equal 45 tank1 move_from_045 accum 2 trigger_if_equal 46 tank1 move_from_046 accum 2 trigger_if_equal 47 tank1 move_from_047 accum 2 trigger_if_equal 48 tank1 move_from_048 accum 2 trigger_if_equal 49 tank1 move_from_049 accum 2 trigger_if_equal 50 tank1 move_from_050 accum 2 trigger_if_equal 51 tank1 move_from_051 accum 2 trigger_if_equal 52 tank1 move_from_052 accum 2 trigger_if_equal 53 tank1 move_from_053 accum 2 trigger_if_equal 54 tank1 move_from_054 // Destroy the Gates: Get the Fuel accum 2 trigger_if_equal 55 tank1 move_from_055 accum 2 trigger_if_equal 56 tank1 move_from_056 accum 2 trigger_if_equal 57 tank1 move_from_057 accum 2 trigger_if_equal 58 tank1 move_from_058 accum 2 trigger_if_equal 59 tank1 move_from_059 accum 2 trigger_if_equal 60 tank1 move_from_060 accum 2 trigger_if_equal 61 tank1 move_from_061 accum 2 trigger_if_equal 62 tank1 move_from_062 accum 2 trigger_if_equal 63 tank1 move_from_063 accum 2 trigger_if_equal 64 tank1 move_from_064 accum 2 trigger_if_equal 65 tank1 move_from_065 accum 2 trigger_if_equal 66 tank1 move_from_066 accum 2 trigger_if_equal 67 tank1 move_from_067 accum 2 trigger_if_equal 68 tank1 move_from_068 accum 2 trigger_if_equal 69 tank1 move_from_069 accum 2 trigger_if_equal 70 tank1 move_from_070 accum 2 trigger_if_equal 71 tank1 move_from_071 accum 2 trigger_if_equal 72 tank1 move_from_072 accum 2 trigger_if_equal 73 tank1 move_from_073 accum 2 trigger_if_equal 74 tank1 move_from_074 accum 2 trigger_if_equal 75 tank1 move_from_075 accum 2 trigger_if_equal 76 tank1 move_from_076 // Destroy the Gates: accum 2 trigger_if_equal 77 tank1 move_from_077 accum 2 trigger_if_equal 78 tank1 move_from_078 accum 2 trigger_if_equal 79 tank1 move_from_079 accum 2 trigger_if_equal 80 tank1 move_from_080 accum 2 trigger_if_equal 81 tank1 move_from_081 accum 2 trigger_if_equal 82 tank1 move_from_082 accum 2 trigger_if_equal 83 tank1 move_from_083 accum 2 trigger_if_equal 84 tank1 move_from_084 accum 2 trigger_if_equal 85 tank1 move_from_085 accum 2 trigger_if_equal 86 tank1 move_from_086 accum 2 trigger_if_equal 87 tank1 move_from_087 accum 2 trigger_if_equal 88 tank1 move_from_088 accum 2 trigger_if_equal 89 tank1 move_from_089 accum 2 trigger_if_equal 90 tank1 move_from_090 accum 2 trigger_if_equal 91 tank1 move_from_091 accum 2 trigger_if_equal 92 tank1 move_from_092 accum 2 trigger_if_equal 93 tank1 move_from_093 accum 2 trigger_if_equal 94 tank1 move_from_094 accum 2 trigger_if_equal 95 tank1 move_from_095 accum 2 trigger_if_equal 96 tank1 move_from_096 accum 2 trigger_if_equal 97 tank1 move_from_097 //End of Route //////////////////////////////////////////////////////////////////////// // MOVE TO REPAIR DEPOT AND BACK //////////////////////////////////////////////////////////////////////// accum 2 trigger_if_equal 100 tank1 move_from_100 //Tank splits to new track to go to repair bay accum 2 trigger_if_equal 101 tank1 move_from_101 accum 2 trigger_if_equal 102 tank1 move_from_102 accum 2 trigger_if_equal 103 tank1 move_from_103 accum 2 trigger_if_equal 104 tank1 move_from_104 accum 2 trigger_if_equal 105 tank1 move_from_105 accum 2 trigger_if_equal 106 tank1 move_from_106 accum 2 trigger_if_equal 107 tank1 move_from_107 accum 2 trigger_if_equal 108 tank1 move_from_108 // Tank Approching Doors accum 2 trigger_if_equal 109 tank1 move_from_109 accum 2 trigger_if_equal 110 tank1 move_from_110 accum 2 trigger_if_equal 111 tank1 move_from_111 // Enter The Repair Locks accum 2 trigger_if_equal 112 tank1 move_from_112 // Stay in Place accum 2 trigger_if_equal 113 tank1 move_from_113 // Stay in Place //////////////////////////////////////////////////////////////////////// // MOVE BACK TO DESTROYED LOCATION //////////////////////////////////////////////////////////////////////// accum 2 trigger_if_equal 200 tank1 move_from_200 // Begin Return Trip accum 2 trigger_if_equal 201 tank1 move_from_201 accum 2 trigger_if_equal 202 tank1 move_from_202 accum 2 trigger_if_equal 203 tank1 move_from_203 accum 2 trigger_if_equal 204 tank1 move_from_204 accum 2 trigger_if_equal 205 tank1 move_from_205 accum 2 trigger_if_equal 206 tank1 move_from_206 accum 2 trigger_if_equal 207 tank1 move_from_207 accum 2 trigger_if_equal 208 tank1 move_from_208 accum 2 trigger_if_equal 209 tank1 move_from_209 accum 2 trigger_if_equal 210 tank1 move_from_210 accum 2 trigger_if_equal 211 tank1 move_from_211 accum 2 trigger_if_equal 212 tank1 move_from_017 } //////////////////////////////////////////////////////////////////////// // ================================================ // ============ WAYPOINTS ========================= // ================================================ //////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////// // FIRST STAGE MOVEMENT //////////////////////////////////////////////////////////////////////// // Move from waypoint 001 trigger move_from_001 { accum 0 bitset 1 // Mark as moving followspline 0 wp_001 80 wait length -64 accum 0 bitreset 1 // Mark as not moving // If you want waypoints to loop, this is the place to reset the wp counter // on the last waypoint. // Make sure that the last waypoint targets wp_001 to loop correctly //accum 2 set 0 // Make the waypoints loop around trigger self move_increment } // Move from waypoint 002 trigger move_from_002 { accum 0 bitset 1 // Mark as moving followspline 0 wp_002 80 wait length -64 accum 0 bitreset 1 // Mark as not moving trigger self move_increment } // Move from waypoint 003 trigger move_from_003 { accum 0 bitset 1 // Mark as moving followspline 0 wp_003 80 wait length -64 accum 0 bitreset 1 // Mark as not moving trigger self move_increment // trigger tank1 obstacle_004_added //End of Path. Testing only // trigger self finale //End of Path Testing only } // Move from waypoint 004 trigger move_from_004 { accum 0 bitset 1 // Mark as moving followspline 0 wp_004 80 wait length -64 accum 0 bitreset 1 // Mark as not moving trigger self move_increment } //////////////////////////////////////////////////////////////////////// // First Firing Sequence //////////////////////////////////////////////////////////////////////// // Move from waypoint 005 trigger move_from_005 { accum 0 bitset 1 // Mark as moving followspline 0 wp_005 80 wait length -64 accum 0 bitreset 1 // Mark as not moving // Lock script trigger self script_lock // Stop sound trigger tank1_sound stop // Stopping state trigger self anim_tracks_stop startanimation 45 10 15 nolerp norandom wait 666 // Stationary state startanimation 0 1 15 nolerp norandom // Wait a little until starting the fireing sequence wait 900 // Manually increment wp counter accum 2 inc 1 // This turret function will unlock the script when its done trigger tank1_turret fire_at_target_1 //trigger self move_increment } //////////////////////////////////////////////////////////////////////// // Move from waypoint 006 trigger move_from_006 { accum 0 bitset 1 // Mark as moving followspline 0 wp_006 20 wait length -64 accum 0 bitreset 1 // Mark as not moving trigger self move_increment } // Move from waypoint 007 trigger move_from_007 { accum 0 bitset 1 // Mark as moving followspline 0 wp_007 80 wait length -64 accum 0 bitreset 1 // Mark as not moving trigger self move_increment } // Move from waypoint 008 trigger move_from_008 { accum 0 bitset 1 // Mark as moving followspline 0 wp_008 80 wait length -64 accum 0 bitreset 1 // Mark as not moving trigger self move_increment } // Move from waypoint 009 trigger move_from_009 { accum 0 bitset 1 // Mark as moving followspline 0 wp_009 80 wait length -64 accum 0 bitreset 1 // Mark as not moving trigger self move_increment } // Move from waypoint 010 trigger move_from_010 { accum 0 bitset 1 // Mark as moving followspline 0 wp_010 80 wait length -64 accum 0 bitreset 1 // Mark as not moving trigger self move_increment } // Move from waypoint 011 trigger move_from_011 { accum 0 bitset 1 // Mark as moving followspline 0 wp_011 80 wait length -64 accum 0 bitreset 1 // Mark as not moving trigger self move_increment } // Move from waypoint 012 trigger move_from_012 { accum 0 bitset 1 // Mark as moving followspline 0 wp_012 80 wait length -64 accum 0 bitreset 1 // Mark as not moving trigger self move_increment } // Move from waypoint 013 trigger move_from_013 { accum 0 bitset 1 // Mark as moving followspline 0 wp_013 80 wait length -64 accum 0 bitreset 1 // Mark as not moving trigger self move_increment } // Move from waypoint 014 trigger move_from_014 { accum 0 bitset 1 // Mark as moving followspline 0 wp_014 80 wait length -64 accum 0 bitreset 1 // Mark as not moving trigger self move_increment } // Move from waypoint 015 trigger move_from_015 { accum 0 bitset 1 // Mark as moving followspline 0 wp_015 80 wait length -64 // accum 0 bitreset 1 // Mark as not moving // trigger self choose_path trigger self pistols_at_dawn } //////////////////////////////////////////////////////////////////////// // AT Gun Firing Duel //////////////////////////////////////////////////////////////////////// // End of Stage 1 route trigger pistols_at_dawn { accum 0 bitreset 1 // Mark as not moving // Lock script trigger self script_lock // Stop sound trigger tank1_sound stop // Stopping state trigger self anim_tracks_stop startanimation 45 10 15 nolerp norandom wait 666 // Stationary state startanimation 0 1 15 nolerp norandom // wm_announce "^3Scouting the Area" // Wait a little until starting the fireing sequence // wait 3000 wm_announce "^1WARNING: ^3AT Gun spotted! ^1FIRE AT WILL!!!" // This turret function will unlock the script when its done trigger tank1_turret fire_at_target_2 } //////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////// // AT Gun Destroyed //////////////////////////////////////////////////////////////////////// // End of Stage 1 route // trigger all_clear // { // wm_announce "^2AT Gun destroyed! Continue assault on the Depot Yard!" // trigger self anim_tracks_turningleft // faceangles 0 360 0 4000 // pitch yaw roll time(ms) // trigger self anim_tracks_forward // // trigger self move_assault // } //////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////// // AT Gun Destroyed after tank shoots //////////////////////////////////////////////////////////////////////// // End of Stage 1 route // trigger all_clear2 // { // accum 0 bitset 1 // Mark as not moving // wm_announce "^2AT Gun has been destroyed!!!" // trigger vo_manager tank_depot_esc_vo // Starting state // trigger tank1_sound start // startanimation 55 10 15 nolerp norandom // wait 666 // wait 100 // // // Driving state // trigger tank1_sound move // startanimation 5 40 15 nolerp norandom // trigger self anim_tracks_turningleft // faceangles 0 360 0 4000// pitch yaw roll time(ms) // Wait a bit before starting to move // wait 100 // Unlock script // trigger self script_unlock // Start movement loop // trigger self move_assault // } //////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////// // SECOND STAGE MOVEMENT //////////////////////////////////////////////////////////////////////// // Move from waypoint 017 trigger move_from_017 { accum 0 bitset 1 // Mark as moving followspline 0 wp_017 80 wait length -64 accum 0 bitreset 1 // Mark as not moving trigger self move_increment } // Move from waypoint 018 trigger move_from_018 { accum 0 bitset 1 // Mark as moving followspline 0 wp_018 80 wait length -64 accum 0 bitreset 1 // Mark as not moving trigger self move_increment } // Move from waypoint 019 trigger move_from_019 { accum 0 bitset 1 // Mark as moving followspline 0 wp_019 80 wait length -64 accum 0 bitreset 1 // Mark as not moving trigger self move_increment } // Move from waypoint 020 trigger move_from_020 { accum 0 bitset 1 // Mark as moving followspline 0 wp_020 80 wait length -64 accum 0 bitreset 1 // Mark as not moving trigger self move_increment } // Move from waypoint 021 trigger move_from_021 { accum 0 bitset 1 // Mark as moving followspline 0 wp_021 80 wait length -64 accum 0 bitreset 1 // Mark as not moving trigger self move_increment } // Move from waypoint 022 trigger move_from_022 { accum 0 bitset 1 // Mark as moving followspline 0 wp_022 80 wait length -64 accum 0 bitreset 1 // Mark as not moving trigger self move_increment } // Move from waypoint 023 trigger move_from_023 { accum 0 bitset 1 // Mark as moving followspline 0 wp_023 80 wait length -64 accum 0 bitreset 1 // Mark as not moving trigger self move_increment } // Move from waypoint 024 trigger move_from_024 { accum 0 bitset 1 // Mark as moving followspline 0 wp_024 80 wait length -64 accum 0 bitreset 1 // Mark as not moving trigger self move_increment } // Move from waypoint 025 trigger move_from_025 { accum 0 bitset 1 // Mark as moving followspline 0 wp_025 80 wait length -64 accum 0 bitreset 1 // Mark as not moving trigger self move_increment } // Move from waypoint 026 trigger move_from_026 { accum 0 bitset 1 // Mark as moving followspline 0 wp_026 80 wait length -64 accum 0 bitreset 1 // Mark as not moving trigger self move_increment } // Move from waypoint 027 trigger move_from_027 { accum 0 bitset 1 // Mark as moving followspline 0 wp_027 80 wait length -64 accum 0 bitreset 1 // Mark as not moving trigger self move_increment } // Move from waypoint 028 trigger move_from_028 { accum 0 bitset 1 // Mark as moving followspline 0 wp_028 80 wait length -64 accum 0 bitreset 1 // Mark as not moving trigger self move_increment } // Move from waypoint 029 trigger move_from_029 { accum 0 bitset 1 // Mark as moving followspline 0 wp_029 80 wait length -64 accum 0 bitreset 1 // Mark as not moving trigger self move_increment } // Move from waypoint 030 trigger move_from_030 { accum 0 bitset 1 // Mark as moving followspline 0 wp_030 80 wait length -64 accum 0 bitreset 1 // Mark as not moving trigger tank_upgrades fire trigger self move_increment } // Move from waypoint 031 trigger move_from_031 { accum 0 bitset 1 // Mark as moving followspline 0 wp_031 80 wait length -64 accum 0 bitreset 1 // Mark as not moving trigger self move_increment } // Move from waypoint 032 trigger move_from_032 { accum 0 bitset 1 // Mark as moving followspline 0 wp_032 80 wait length -64 accum 0 bitreset 1 // Mark as not moving trigger self move_increment } // Move from waypoint 033 trigger move_from_033 { accum 0 bitset 1 // Mark as moving followspline 0 wp_033 80 wait length -64 accum 0 bitreset 1 // Mark as not moving trigger self move_increment } // Move from waypoint 034 trigger move_from_034 { accum 0 bitset 1 // Mark as moving followspline 0 wp_034 80 wait length -64 accum 0 bitreset 1 // Mark as not moving trigger self move_increment } // Move from waypoint 035 trigger move_from_035 { accum 0 bitset 1 // Mark as moving followspline 0 wp_035 80 wait length -64 accum 0 bitreset 1 // Mark as not moving trigger self move_increment } // Move from waypoint 036 trigger move_from_036 { accum 0 bitset 1 // Mark as moving followspline 0 wp_036 80 wait length -64 accum 0 bitreset 1 // Mark as not moving trigger self move_increment } // Move from waypoint 037 trigger move_from_037 { accum 0 bitset 1 // Mark as moving followspline 0 wp_037 80 wait length -64 accum 0 bitreset 1 // Mark as not moving trigger self move_increment } // Move from waypoint 038 trigger move_from_038 { accum 0 bitset 1 // Mark as moving followspline 0 wp_038 80 wait length -64 accum 0 bitreset 1 // Mark as not moving trigger self move_increment } // Move from waypoint 039 trigger move_from_039 { accum 0 bitset 1 // Mark as moving followspline 0 wp_039 80 wait length -64 accum 0 bitreset 1 // Mark as not moving trigger self move_increment } // Move from waypoint 040 trigger move_from_040 { accum 0 bitset 1 // Mark as moving followspline 0 wp_040 80 wait length -64 accum 0 bitreset 1 // Mark as not moving trigger self move_increment } // Move from waypoint 041 trigger move_from_041 { accum 0 bitset 1 // Mark as moving followspline 0 wp_041 80 wait length -64 accum 0 bitreset 1 // Mark as not moving trigger vo_manager atgun_past_vo //Tank is past the AT gun trigger at_gun_trigger range_bad trigger self move_increment } // Move from waypoint 042 trigger move_from_042 { accum 0 bitset 1 // Mark as moving followspline 0 wp_042 80 wait length -64 accum 0 bitreset 1 // Mark as not moving trigger self move_increment } // Move from waypoint 043 trigger move_from_043 { accum 0 bitset 1 // Mark as moving followspline 0 wp_043 80 wait length -64 accum 0 bitreset 1 // Mark as not moving trigger self move_increment } // Move from waypoint 044 trigger move_from_044 { accum 0 bitset 1 // Mark as moving followspline 0 wp_044 80 wait length -64 accum 0 bitreset 1 // Mark as not moving trigger self move_increment } // Move from waypoint 045 trigger move_from_045 { accum 0 bitset 1 // Mark as moving followspline 0 wp_045 80 wait length -64 accum 0 bitreset 1 // Mark as not moving trigger self move_increment } // Move from waypoint 046 trigger move_from_046 { accum 0 bitset 1 // Mark as moving followspline 0 wp_046 80 wait length -64 accum 0 bitreset 1 // Mark as not moving trigger self move_increment } // Move from waypoint 047 trigger move_from_047 { accum 0 bitset 1 // Mark as moving followspline 0 wp_047 80 wait length -64 accum 0 bitreset 1 // Mark as not moving trigger self move_increment } // Move from waypoint 048 trigger move_from_048 { accum 0 bitset 1 // Mark as moving followspline 0 wp_048 80 wait length -64 accum 0 bitreset 1 // Mark as not moving trigger self move_increment } // Move from waypoint 049 trigger move_from_049 { accum 0 bitset 1 // Mark as moving followspline 0 wp_049 80 wait length -64 accum 0 bitreset 1 // Mark as not moving trigger self move_increment } // Move from waypoint 050 trigger move_from_050 { accum 0 bitset 1 // Mark as moving followspline 0 wp_050 80 wait length -64 accum 0 bitreset 1 // Mark as not moving trigger self move_increment } // Move from waypoint 051 trigger move_from_051 { accum 0 bitset 1 // Mark as moving followspline 0 wp_051 80 wait length -64 accum 0 bitreset 1 // Mark as not moving trigger self move_increment } // Move from waypoint 052 trigger move_from_052 { accum 0 bitset 1 // Mark as moving followspline 0 wp_052 80 wait length -64 accum 0 bitreset 1 // Mark as not moving trigger self move_increment } // Move from waypoint 053 trigger move_from_053 { accum 0 bitset 1 // Mark as moving followspline 0 wp_053 80 wait length -64 accum 0 bitreset 1 // Mark as not moving trigger self move_increment } // Move from waypoint 054 trigger move_from_054 { accum 0 bitset 1 // Mark as moving followspline 0 wp_054 80 wait length -64 accum 0 bitreset 1 // Mark as not moving trigger tank1 obstacle_003_added //Tank is out of Fuel // Lock script trigger self script_lock // Stop sound trigger tank1_sound stop // Stopping state trigger self anim_tracks_stop startanimation 45 10 15 nolerp norandom wait 666 // Stationary state startanimation 0 1 15 nolerp norandom // Wait a little until starting the fireing sequence wait 900 // Manually increment wp counter accum 2 inc 1 // This turret function will unlock the script when its done trigger tank1_turret fire_at_target_3 trigger at_gun flash_switch trigger at_gun_target switch_armour //Tank takes 2 times damage from the rear. trigger tank1 fuel_on //Turn on red fuel cands } //////////////////////////////////////////////////////////////////////// // MOVE TO Airfield Tunnel //////////////////////////////////////////////////////////////////////// // Move from waypoint 055 trigger move_from_055 { accum 0 bitset 1 // Mark as moving followspline 0 wp_055 80 wait length -64 accum 0 bitreset 1 // Mark as not moving trigger self move_increment } // Move from waypoint 056 trigger move_from_056 { accum 0 bitset 1 // Mark as moving followspline 0 wp_056 80 wait length -64 accum 0 bitreset 1 // Mark as not moving trigger self move_increment } // Move from waypoint 057 trigger move_from_057 { accum 0 bitset 1 // Mark as moving followspline 0 wp_057 80 wait length -64 accum 0 bitreset 1 // Mark as not moving trigger self move_increment } // Move from waypoint 058 trigger move_from_058 { accum 0 bitset 1 // Mark as moving followspline 0 wp_058 80 wait length -64 accum 0 bitreset 1 // Mark as not moving trigger self move_increment } // Move from waypoint 059 trigger move_from_059 { accum 0 bitset 1 // Mark as moving followspline 0 wp_059 80 wait length -64 accum 0 bitreset 1 // Mark as not moving trigger self move_increment } // Move from waypoint 060 trigger move_from_060 { accum 0 bitset 1 // Mark as moving followspline 0 wp_060 80 wait length -64 accum 0 bitreset 1 // Mark as not moving trigger self move_increment } // Move from waypoint 061 trigger move_from_061 { accum 0 bitset 1 // Mark as moving followspline 0 wp_061 80 wait length -64 accum 0 bitreset 1 // Mark as not moving trigger self move_increment } // Move from waypoint 062 trigger move_from_062 { accum 0 bitset 1 // Mark as moving followspline 0 wp_062 80 wait length -64 accum 0 bitreset 1 // Mark as not moving trigger self move_increment } // Move from waypoint 063 trigger move_from_063 { accum 0 bitset 1 // Mark as moving followspline 0 wp_063 80 wait length -64 accum 0 bitreset 1 // Mark as not moving trigger self move_increment } // Move from waypoint 064 trigger move_from_064 { accum 0 bitset 1 // Mark as moving followspline 0 wp_064 80 wait length -64 accum 0 bitreset 1 // Mark as not moving trigger self move_increment } // Move from waypoint 065 trigger move_from_065 { accum 0 bitset 1 // Mark as moving followspline 0 wp_065 80 wait length -64 accum 0 bitreset 1 // Mark as not moving trigger self move_increment } // Move from waypoint 066 trigger move_from_066 { accum 0 bitset 1 // Mark as moving followspline 0 wp_066 80 wait length -64 accum 0 bitreset 1 // Mark as not moving trigger self move_increment } // Move from waypoint 067 trigger move_from_067 { accum 0 bitset 1 // Mark as moving followspline 0 wp_067 80 wait length -64 accum 0 bitreset 1 // Mark as not moving trigger self move_increment } // Move from waypoint 068 trigger move_from_068 { accum 0 bitset 1 // Mark as moving followspline 0 wp_068 80 wait length -64 accum 0 bitreset 1 // Mark as not moving trigger self move_increment } // Move from waypoint 069 trigger move_from_069 { accum 0 bitset 1 // Mark as moving followspline 0 wp_069 80 wait length -64 accum 0 bitreset 1 // Mark as not moving trigger at_gun_trigger range_ok trigger vo_manager gun_fire trigger self move_increment } // Move from waypoint 070 trigger move_from_070 { accum 0 bitset 1 // Mark as moving followspline 0 wp_070 80 wait length -64 accum 0 bitreset 1 // Mark as not moving trigger self move_increment } // Move from waypoint 071 trigger move_from_071 { accum 0 bitset 1 // Mark as moving followspline 0 wp_071 80 wait length -64 accum 0 bitreset 1 // Mark as not moving trigger self move_increment } // Move from waypoint 072 trigger move_from_072 { accum 0 bitset 1 // Mark as moving followspline 0 wp_072 80 wait length -64 accum 0 bitreset 1 // Mark as not moving trigger self move_increment } // Move from waypoint 073 trigger move_from_073 { accum 0 bitset 1 // Mark as moving followspline 0 wp_073 80 wait length -64 accum 0 bitreset 1 // Mark as not moving trigger self move_increment } // Move from waypoint 074 trigger move_from_074 { accum 0 bitset 1 // Mark as moving followspline 0 wp_074 80 wait length -64 accum 0 bitreset 1 // Mark as not moving trigger self move_increment } // Move from waypoint 075 trigger move_from_075 { accum 0 bitset 1 // Mark as moving followspline 0 wp_075 80 wait length -64 accum 0 bitreset 1 // Mark as not moving trigger self move_increment } // Move from waypoint 076 trigger move_from_076 { accum 0 bitset 1 // Mark as moving followspline 0 wp_076 80 wait length -64 accum 0 bitreset 1 // Mark as not moving trigger tank_upgrades fire_exit trigger self move_increment } // Move from waypoint 077 trigger move_from_077 { accum 0 bitset 1 // Mark as moving followspline 0 wp_077 80 wait length -64 accum 0 bitreset 1 // Mark as not moving trigger self move_increment } // Move from waypoint 078 trigger move_from_078 { accum 0 bitset 1 // Mark as moving followspline 0 wp_078 80 wait length -64 accum 0 bitreset 1 // Mark as not moving trigger self move_increment } // Move from waypoint 079 trigger move_from_079 { accum 0 bitset 1 // Mark as moving followspline 0 wp_079 80 wait length -64 accum 0 bitreset 1 // Mark as not moving trigger self move_increment } // Move from waypoint 080 trigger move_from_080 { accum 0 bitset 1 // Mark as moving followspline 0 wp_080 80 wait length -64 accum 0 bitreset 1 // Mark as not moving trigger self move_increment } // Move from waypoint 081 trigger move_from_081 { accum 0 bitset 1 // Mark as moving followspline 0 wp_081 80 wait length -64 accum 0 bitreset 1 // Mark as not moving trigger self move_increment } // Move from waypoint 082 trigger move_from_082 { accum 0 bitset 1 // Mark as moving followspline 0 wp_082 80 wait length -64 accum 0 bitreset 1 // Mark as not moving trigger self move_increment } // Move from waypoint 083 trigger move_from_083 { accum 0 bitset 1 // Mark as moving followspline 0 wp_083 80 wait length -64 accum 0 bitreset 1 // Mark as not moving trigger self move_increment } // Move from waypoint 084 trigger move_from_084 { accum 0 bitset 1 // Mark as moving followspline 0 wp_084 80 wait length -64 accum 0 bitreset 1 // Mark as not moving trigger self move_increment } // Move from waypoint 085 trigger move_from_085 { accum 0 bitset 1 // Mark as moving followspline 0 wp_085 80 wait length -64 accum 0 bitreset 1 // Mark as not moving trigger self move_increment } // Move from waypoint 086 trigger move_from_086 { accum 0 bitset 1 // Mark as moving followspline 0 wp_086 80 wait length -64 accum 0 bitreset 1 // Mark as not moving trigger self move_increment } // Move from waypoint 087 trigger move_from_087 { accum 0 bitset 1 // Mark as moving followspline 0 wp_087 80 wait length -64 accum 0 bitreset 1 // Mark as not moving trigger self move_increment } // Move from waypoint 088 trigger move_from_088 { accum 0 bitset 1 // Mark as moving followspline 0 wp_088 80 wait length -64 accum 0 bitreset 1 // Mark as not moving trigger self move_increment } // Move from waypoint 089 trigger move_from_089 { accum 0 bitset 1 // Mark as moving followspline 0 wp_089 80 wait length -64 accum 0 bitreset 1 // Mark as not moving trigger self move_increment } // Move from waypoint 090 trigger move_from_090 { accum 0 bitset 1 // Mark as moving followspline 0 wp_090 80 wait length -64 accum 0 bitreset 1 // Mark as not moving trigger self move_increment } // Move from waypoint 091 trigger move_from_091 { accum 0 bitset 1 // Mark as moving followspline 0 wp_091 80 wait length -64 accum 0 bitreset 1 // Mark as not moving trigger at_gun_trigger range_bad trigger self move_increment } // Move from waypoint 092 trigger move_from_092 { accum 0 bitset 1 // Mark as moving followspline 0 wp_092 80 wait length -64 accum 0 bitreset 1 // Mark as not moving trigger self move_increment } // Move from waypoint 093 trigger move_from_093 { accum 0 bitset 1 // Mark as moving followspline 0 wp_093 80 wait length -64 accum 0 bitreset 1 // Mark as not moving trigger self move_increment } // Move from waypoint 094 trigger move_from_094 { accum 0 bitset 1 // Mark as moving followspline 0 wp_094 80 wait length -64 accum 0 bitreset 1 // Mark as not moving trigger self move_increment } // Move from waypoint 095 trigger move_from_095 { accum 0 bitset 1 // Mark as moving followspline 0 wp_095 80 wait length -64 accum 0 bitreset 1 // Mark as not moving trigger self move_increment } // Move from waypoint 096 trigger move_from_096 { accum 0 bitset 1 // Mark as moving followspline 0 wp_096 80 wait length -64 accum 0 bitreset 1 // Mark as not moving trigger self move_increment } // Move from waypoint 097 trigger move_from_097 { accum 0 bitset 1 // Mark as moving followspline 0 wp_097 80 wait length -64 accum 0 bitreset 1 // Mark as not moving trigger tank1 obstacle_004_added //End of Path. trigger self finale } trigger finale { // Lock script trigger self script_lock // Stop sound trigger tank1_sound stop // Stopping state trigger self anim_tracks_stop startanimation 45 10 15 nolerp norandom wait 666 // Stationary state startanimation 0 1 15 nolerp norandom trigger game_manager allies_objective_counter //Tank has blow depot gates // trigger self script_unlock } //////////////////////////////////////////////////////////////////////// // MOVE TO REPAIR DEPOT //////////////////////////////////////////////////////////////////////// // Move from waypoint 99 trigger move_from_99 { accum 0 bitset 1 // Mark as moving followspline 0 wp_99 80 wait length 64 accum 0 bitreset 1 // Mark as not moving trigger self move_increment } // Move from waypoint 100 trigger move_from_100 { accum 0 bitset 1 // Mark as moving followspline 0 wp_100 80 wait length 64 accum 0 bitreset 1 // Mark as not moving trigger self move_increment } // Move from waypoint 101 trigger move_from_101 { accum 0 bitset 1 // Mark as moving followspline 0 wp_101 80 wait length 64 accum 0 bitreset 1 // Mark as not moving trigger autofire_trigger miss trigger self move_increment } // Move from waypoint 102 trigger move_from_102 { accum 0 bitset 1 // Mark as moving followspline 0 wp_102 80 wait length 64 accum 0 bitreset 1 // Mark as not moving trigger self move_increment } // Move from waypoint 103 trigger move_from_103 { accum 0 bitset 1 // Mark as moving followspline 0 wp_103 80 wait length 64 accum 0 bitreset 1 // Mark as not moving trigger self move_increment } // Move from waypoint 104 trigger move_from_104 { accum 0 bitset 1 // Mark as moving followspline 0 wp_104 80 wait length 64 accum 0 bitreset 1 // Mark as not moving trigger self move_increment } // Move from waypoint 105 trigger move_from_105 { accum 0 bitset 1 // Mark as moving followspline 0 wp_105 80 wait length 64 accum 0 bitreset 1 // Mark as not moving trigger self move_increment } // Move from waypoint 106 trigger move_from_106 { accum 0 bitset 1 // Mark as moving followspline 0 wp_106 80 wait length 64 accum 0 bitreset 1 // Mark as not moving trigger self move_increment } // Move from waypoint 107 trigger move_from_107 { accum 0 bitset 1 // Mark as moving followspline 0 wp_107 80 wait length 64 accum 0 bitreset 1 // Mark as not moving trigger self move_increment trigger repair_door disable // Prevents door operation while tank is in the way } // Move from waypoint 108 trigger move_from_108 { accum 0 bitset 1 // Mark as moving followspline 0 wp_108 80 wait length 64 accum 0 bitreset 1 // Mark as not moving trigger self move_increment } // Move from waypoint 109 trigger move_from_109 { accum 0 bitset 1 // Mark as moving followspline 0 wp_109 80 wait length 64 accum 0 bitreset 1 // Mark as not moving trigger self move_increment } // Move from waypoint 110 trigger move_from_110 { accum 0 bitset 1 // Mark as moving followspline 0 wp_110 80 wait length 64 accum 0 bitreset 1 // Mark as not moving trigger self move_increment } // Move to waypoint 111 trigger move_from_111 { accum 0 bitset 1 // Mark as moving followspline 0 wp_111 80 wait length 64 accum 0 bitreset 1 // Mark as not moving trigger self obstacle_002_added //Tank is in repair position. Waiting for repairs. trigger self about_face } trigger about_face { // Lock script trigger self script_lock trigger self anim_tracks_turningleft faceangles 0 90 0 8000 // pitch yaw roll time(ms) // Stop sound trigger tank1_sound stop // Stopping state trigger self anim_tracks_stop startanimation 45 10 15 nolerp norandom wait 666 // Stationary state startanimation 0 1 15 nolerp norandom // Wait a little before setting additional conditions wait 100 trigger repair_door enable // Allows Repair Depot Doors to lower trigger repair_lock_trigger enable // Allows Tank Repair Locks to engage trigger vo_manager tank_esc_repdep_arrived_vo trigger self script_unlock trigger hint_arrow_green on } // Move from waypoint 112 trigger move_from_112 { accum 0 bitset 1 // Mark as moving followspline 0 wp_112 80 wait length 64 accum 0 bitreset 1 // Mark as not moving trigger self move_increment } //////////////////////////////////////////////////////////////////////// // Tank Returns to Fight //////////////////////////////////////////////////////////////////////// trigger giddyup { accum 2 set 200 // wm_announce "The Tank is Returning to Battle!" // trigger vo_manager tank_depot_esc_vo // trigger vo_manager tank_need_esc_vo trigger tank1 obstacle_002_removed //Tank has been repaired. Get moving trigger self mov_return } //////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////// // LEAVING REPAIR DEPOT //////////////////////////////////////////////////////////////////////// // Move from waypoint 200 trigger move_from_200 { accum 0 bitset 1 // Mark as moving followspline 0 wp_200 80 wait length 64 accum 0 bitreset 1 // Mark as not moving trigger self move_increment } // Move from waypoint 201 trigger move_from_201 { accum 0 bitset 1 // Mark as moving followspline 0 wp_201 80 wait length 64 accum 0 bitreset 1 // Mark as not moving trigger self move_increment } // Move from waypoint 202 trigger move_from_202 { accum 0 bitset 1 // Mark as moving followspline 0 wp_202 80 wait length 64 accum 0 bitreset 1 // Mark as not moving // trigger at_gun_trigger restored //If AT gun is not dead, set manual fire on trigger self move_increment } // Move from waypoint 203 trigger move_from_203 { accum 0 bitset 1 // Mark as moving followspline 0 wp_203 80 wait length 64 accum 0 bitreset 1 // Mark as not moving trigger self move_increment } // Move from waypoint 204 trigger move_from_204 { accum 0 bitset 1 // Mark as moving followspline 0 wp_204 80 wait length 64 accum 0 bitreset 1 // Mark as not moving trigger self move_increment } // Move from waypoint 205 trigger move_from_205 { accum 0 bitset 1 // Mark as moving followspline 0 wp_205 80 wait length 64 accum 0 bitreset 1 // Mark as not moving trigger autofire_trigger break trigger self move_increment } // Move from waypoint 206 trigger move_from_206 { accum 0 bitset 1 // Mark as moving followspline 0 wp_206 80 wait length 64 accum 0 bitreset 1 // Mark as not moving trigger self move_increment } // Move from waypoint 207 trigger move_from_207 { accum 0 bitset 1 // Mark as moving followspline 0 wp_207 80 wait length 64 accum 0 bitreset 1 // Mark as not moving trigger self move_increment } // Move from waypoint 208 trigger move_from_208 { accum 0 bitset 1 // Mark as moving followspline 0 wp_208 80 wait length 64 accum 0 bitreset 1 // Mark as not moving trigger self move_increment } // Move from waypoint 209 trigger move_from_209 { accum 0 bitset 1 // Mark as moving followspline 0 wp_209 80 wait length 64 accum 0 bitreset 1 // Mark as not moving trigger self move_increment } // Move from waypoint 210 trigger move_from_210 { accum 0 bitset 1 // Mark as moving followspline 0 wp_210 80 wait length 64 accum 0 bitreset 1 // Mark as not moving trigger at_gun_trigger range_ok trigger self move_increment } // Move from waypoint 211 trigger move_from_211 { accum 0 bitset 1 // Mark as moving followspline 0 wp_211 80 wait length 64 trigger self anim_tracks_turningright faceangles 0 360 0 4000 // pitch yaw roll time(ms) trigger self anim_tracks_forward accum 0 bitreset 1 // Mark as not moving trigger self move_caution } //////////////////////////////////////////////////////////////////////// //================================================================== // WAYPOINT CHECKS //================================================================== // Waypoint functions that checks if it can proceed to the next wp. //////////////////////////////////////////////////////////////////////// // CHECK DEATH // Check if its broken, and if so change to the broken state //////////////////////////////////////////////////////////////////////// trigger check_death { // Check if its broken accum 0 abort_if_not_bitset 0 // Abort if not broken accum 0 abort_if_bitset 1 // Abort if its already moving accum 0 abort_if_bitset 4 // Abort if its already in its broken state accum 9 abort_if_not_equal 0 // Abort if the script is currently locked // Lock script trigger self script_lock // This target_kill entity will kill the func_constructible so that an engineer can repair it alertentity tank1_kill // Change from fixed to broken model changemodel models/praetoria/ch_tank/ch_tank_brkn.md3 // Start smoking setstate tank1_smoke default // Death sound trigger self sound_death // Stopping state trigger self anim_tracks_stop startanimation 45 10 15 nolerp norandom wait 666 // Stationary state startanimation 0 1 15 nolerp norandom // Update state bits accum 0 bitset 4 // Mark as visually broken state //==================================================================================== wm_announce "The Tank has been damaged!" // *----------------------------------- vo ------------------------------------------* //==================================================================================== wm_teamvoiceannounce 0 "axis_hq_tank_damaged" wm_teamvoiceannounce 1 "allies_hq_tank_damaged_axis" wait 200 wm_addteamvoiceannounce 1 "allies_hq_tank_damaged_axis" wm_removeteamvoiceannounce 0 "axis_hq_tank_stop" // *---------------------------------------------------------------------------------* //==================================================================================== // Unlock script trigger self script_unlock } //////////////////////////////////////////////////////////////////////// // CHECK ESCORT // Check if tank is escorted, and if not then stop it //////////////////////////////////////////////////////////////////////// trigger check_escort { // Check if its not escorted accum 0 abort_if_bitset 2 // Abort if escort is present // Lock script trigger self script_lock // Stop sound trigger tank1_sound stop // Stopping state trigger self anim_tracks_stop startanimation 45 10 15 nolerp norandom wait 666 // Stationary state startanimation 0 1 15 nolerp norandom // Unlock script trigger self script_unlock } //////////////////////////////////////////////////////////////////////// // CHECK OBSTACLE // Check if there is an obstacle preventing it from continuing to the next wp, and if so then stop it //////////////////////////////////////////////////////////////////////// trigger check_obstacle { // Update obstacle bit (with the help of the wp counter and some of the obstacle functions) trigger self check_obstacle_status accum 0 abort_if_not_bitset 3 // Abort if no obstacles in the way // Lock script trigger self script_lock // Stop sound trigger tank1_sound stop // Stopping state trigger self anim_tracks_stop startanimation 45 10 15 nolerp norandom wait 666 // Stationary state startanimation 0 1 15 nolerp norandom // Unlock script trigger self script_unlock } //====================================================================== // OBSTACLE FUNCTIONS //====================================================================== // Dispatching obstacle checking function trigger check_obstacle_status { accum 0 bitreset 3 // Mark as no obstacles in the way // Choose the wp that occurs right before the obstacle. // Only checks for obstacles when it reaches the specified wp. accum 2 trigger_if_equal 16 tank1 obstacle_000_check //(If wp is equal to 16, AT Gun Check time) accum 2 trigger_if_equal 108 tank1 obstacle_001_check //(If wp is equal to 108, Is Repair Bay Door Lowered?) accum 2 trigger_if_equal 111 tank1 obstacle_002_check //(If wp is equal to 111, Is Tank at Repair postion?) accum 2 trigger_if_equal 202 tank1 obstacle_001_check //(If wp is equal to 202, Is Repair Bay Door Lowered?) accum 2 trigger_if_equal 55 tank1 obstacle_003_check //(If wp is equal to 54, check for out of fuel) accum 2 trigger_if_equal 81 tank1 obstacle_004_check //(If wp is equal to 81, check for end of route) } // ================================================ // ============ AUTOMATIC OBSTACLE ================ // ================================================ // AT GUN // Auto obstacle - Checks if the obstacle is blocking the way trigger obstacle_000_check { accum 1 abort_if_not_bitset 0 // Abort if the obstacle has been removed // wm_announce "The Tank encountered an obstacle" accum 0 bitset 3 // Mark as an obstacle in the way } // Auto obstacle - Add autfire AT gun as obstacle to alter tank route trigger obstacle_000_added { accum 1 bitset 0 // Mark obstacle as in the way } // Auto obstacle - Autofire AT gun no longer an obstacle trigger obstacle_000_removed { accum 1 bitreset 0 // Mark obstacle as removed } // ================================================ // ========== FIRST OBSTACLE ================== // ================================================ // REPAIR DEPOT DOOR // First obstacle - Checks if the obstacle is blocking the way trigger obstacle_001_check { accum 1 abort_if_not_bitset 1 // Abort if the obstacle has been removed // wm_announce "The Tank encountered an obstacle" accum 0 bitset 3 // Mark as an obstacle in the way } // First obstacle - Called by the "built final" routine in tank barrier entity, once the obstacle is constructed trigger obstacle_001_added { accum 1 bitset 1 // Mark obstacle as in the way } // First obstacle - Called by the death routine in another entity, once the obstacle is destroyed trigger obstacle_001_removed { accum 1 bitreset 1 // Mark obstacle as removed } // ================================================ // ========== SECOND OBSTACLE ===================== // ================================================ // REPAIR LOCK POSITION // SECOND obstacle - Checks if the obstacle is blocking the way trigger obstacle_002_check { accum 1 abort_if_not_bitset 2 // Abort if the obstacle has been removed // wm_announce "The Tank encountered an obstacle" accum 0 bitset 3 // Mark as an obstacle in the way } // SECOND obstacle - Called by the "built final" routine in tank barrier entity, once the obstacle is constructed trigger obstacle_002_added { accum 1 bitset 2 // Mark obstacle as in the way } // SECOND obstacle - Called by the death routine in another entity, once the obstacle is destroyed trigger obstacle_002_removed { accum 1 bitreset 2 // Mark obstacle as removed } // ================================================ // ========== THIRD OBSTACLE ===================== // ================================================ // OUT OF FUEL // Third obstacle - Checks if the obstacle is blocking the way trigger obstacle_003_check { accum 1 abort_if_not_bitset 3 // Abort if the obstacle has been removed // wm_announce "The Tank encountered an obstacle" accum 0 bitset 3 // Mark as an obstacle in the way } // Third obstacle - Called by the "built final" routine in tank barrier entity, once the obstacle is constructed trigger obstacle_003_added { accum 1 bitset 3 // Mark obstacle as in the way } // Third obstacle - Called by the death routine in another entity, once the obstacle is destroyed trigger obstacle_003_removed { accum 1 bitreset 3 // Mark obstacle as removed } // ================================================ // =========== FOURTH OBSTACLE ===================== // ================================================ // FOURTH obstacle - Called at the last wp to stop the tank trigger obstacle_004_check { accum 1 abort_if_not_bitset 4 // Abort if the obstacle has been removed // wm_announce "The Tank encountered an obstacle" accum 0 bitset 4 // Mark as an obstacle in the way } // FOURTH obstacle - Called by the "built final" routine in tank barrier entity, once the obstacle is constructed trigger obstacle_004_added { accum 1 bitset 4 // Mark obstacle as in the way } //////////////////////////////////////////////////////////////////////// //================================================================== // TANK SOUNDS //================================================================== //////////////////////////////////////////////////////////////////////// trigger sound_idle { stopsound playsound sound/vehicles/tank/tank_idle.wav looping volume 512 } trigger sound_start { stopsound playsound sound/vehicles/tank/tank_revup.wav volume 196 } trigger sound_move { stopsound playsound sound/vehicles/tank/tank_move.wav looping volume 512 } trigger sound_stop { stopsound playsound sound/vehicles/tank/tank_revdown.wav volume 196 } trigger sound_death { stopsound playsound sound/vehicles/tank/tank_stop.wav volume 256 } trigger sound_rebirth { stopsound playsound sound/vehicles/tank/tank_start.wav volume 196 } //////////////////////////////////////////////////////////////////////// //================================================================== // TANK ANIMATIONS //================================================================== //////////////////////////////////////////////////////////////////////// trigger anim_tracks_forward { remapshader models/praetoria/ch_tank/tracks_r models/praetoria/ch_tank/tracks_f remapshader models/mapobjects/tanks_sd/wheel_r models/mapobjects/tanks_sd/wheel_forward remapshader models/praetoria/ch_tank/tracks_l models/praetoria/ch_tank/tracks_f remapshader models/mapobjects/tanks_sd/wheel_l models/mapobjects/tanks_sd/wheel_forward remapshaderflush } trigger anim_tracks_reverse { remapshader models/praetoria/ch_tank/tracks_r models/praetoria/ch_tank/tracks_b remapshader models/mapobjects/tanks_sd/wheel_r models/mapobjects/tanks_sd/wheel_backward remapshader models/praetoria/ch_tank/tracks_l models/praetoria/ch_tank/tracks_b remapshader models/mapobjects/tanks_sd/wheel_l models/mapobjects/tanks_sd/wheel_backward remapshaderflush } trigger anim_tracks_turningleft { remapshader models/praetoria/ch_tank/tracks_r models/praetoria/ch_tank/tracks_f remapshader models/mapobjects/tanks_sd/wheel_r models/mapobjects/tanks_sd/wheel_forward remapshader models/praetoria/ch_tank/tracks_l models/praetoria/ch_tank/tracks_b remapshader models/mapobjects/tanks_sd/wheel_l models/mapobjects/tanks_sd/wheel_backward remapshaderflush } trigger anim_tracks_turningright { remapshader models/praetoria/ch_tank/tracks_r models/praetoria/ch_tank/tracks_b remapshader models/mapobjects/tanks_sd/wheel_r models/mapobjects/tanks_sd/wheel_backward remapshader models/praetoria/ch_tank/tracks_l models/praetoria/ch_tank/tracks_f remapshader models/mapobjects/tanks_sd/wheel_l models/mapobjects/tanks_sd/wheel_forward remapshaderflush } trigger anim_tracks_stop { remapshader models/praetoria/ch_tank/tracks_r models/praetoria/ch_tank/tracks_r remapshader models/mapobjects/tanks_sd/wheel_r models/mapobjects/tanks_sd/wheel_r remapshader models/praetoria/ch_tank/tracks_l models/praetoria/ch_tank/tracks_l remapshader models/mapobjects/tanks_sd/wheel_l models/mapobjects/tanks_sd/wheel_l remapshaderflush } trigger anim_fire_start { startanimation 67 8 10 nolerp norandom } trigger anim_fire_stop { startanimation 0 1 15 nolerp norandom } } // \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ // ||||||||||[ ATTATCHED TANK ENTITIES ]||||||||||||||||||||||||||||||||||| // /////////////////////////////////////////////////////////////////////////////////// // The following are related entities which are attached because they need to follow the script_mover tank1_enabler_trigger { spawn { // Wait for host entity to spawn wait 100 // Attaches itself to a tag on the script_mover attachtotag tank1 tag_turret } } tank1_flash { spawn { // Wait for host entity to spawn wait 200 // Attaches itself to a tag on the script_mover attachtotag tank1_turret tag_flash // Hides the flash setstate tank1_flash invisible } } tank1_smoke { spawn { // Wait for host entity to spawn wait 100 // Attaches itself to a tag on the script_mover attachtotag tank1 tag_turret // Turn off smoking alertentity tank1_smoke } } tank1_smoke2 { spawn { // Wait for host entity to spawn wait 100 // Attaches itself to a tag on the script_mover attachtotag tank1 tag_turret // Turn off smoking alertentity tank1_smoke2 } } tank1_explo { spawn { // Wait for host entity to spawn wait 100 // Attaches itself to a tag on the script_mover attachtotag tank1 tag_turret } } tank1_fx { spawn { // Wait for host entity to spawn wait 100 // Attaches itself to a tag on the script_mover attachtotag tank1 tag_turret // attachtotag tank1_turret tag_flash } } tank1_fire { spawn { // Wait for host entity to spawn wait 100 setstate tank1_fire invisible // Attaches itself to a tag on the script_mover attachtotag tank1 tag_turret } } tank1_firehurt { spawn { // Wait for host entity to spawn wait 100 setstate tank1_firehurt invisible // Attaches itself to a tag on the script_mover attachtotag tank1 tag_turret } } tank1_toi { spawn { // Wait for host entity to spawn wait 100 // Attaches itself to a tag on the script_mover attachtotag tank1 tag_turret } } // \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ // ||||||||||[ TANK UPGRADES ]||||||||||||||||||||||||||||||||||| // /////////////////////////////////////////////////////////////////////////////////// tank_upgrades { spawn { // Wait for host entity to spawn wait 100 accum 1 set 0 // Attaches itself to a tag on the script_mover attachtotag tank1 tag_turret setstate tank_upgrades invisible } trigger cov { setstate tank_upgrades default changemodel models/praetoria/up_tank/up_rig_1.md3 } trigger med { changemodel models/praetoria/up_tank/up_rig_2.md3 } trigger fop { changemodel models/praetoria/up_tank/up_rig_3.md3 } trigger sol { changemodel models/praetoria/up_tank/up_rig_4.md3 } trigger eng { remapshader "models/mapobjects/tanks_sd/mg42turret" "models/praetoria/up_tank/mgturret" remapshader "models/praetoria/ch_tank/body" "models/praetoria/up_tank/body" remapshaderflush } trigger fuel { changemodel models/praetoria/up_tank/up_rig_5.md3 } trigger fuel_l { changemodel models/praetoria/up_tank/up_rig_6.md3 } trigger fuel_r { changemodel models/praetoria/up_tank/up_rig_7.md3 } trigger disable { setstate tank_ammotrgr invisible setstate tank_healthtrgr invisible } trigger enable { setstate tank_ammotrgr default setstate tank_healthtrgr default } trigger fire { accum 1 abort_if_equal 1 accum 1 set 1 setstate tank_panzer_flash default setstate tank_panzer_killer default playsound sound/weapons/rocket/rocket_fire.wav wait 50 alertentity wall_north setstate tank_panzer_flash invisible setstate tank_panzer_killer invisible wait 500 setstate tank_panzer_flash default setstate tank_panzer_killer default playsound sound/weapons/rocket/rocket_fire.wav wait 50 alertentity gate_north setstate tank_panzer_flash invisible setstate tank_panzer_killer invisible wait 500 setstate tank_panzer_flash default setstate tank_panzer_killer default playsound sound/weapons/rocket/rocket_fire.wav wait 50 alertentity roof_north setstate tank_panzer_flash invisible setstate tank_panzer_killer invisible wait 500 setstate tank_panzer_flash default setstate tank_panzer_killer default playsound sound/weapons/rocket/rocket_fire.wav wait 50 alertentity roof_south setstate tank_panzer_flash invisible setstate tank_panzer_killer invisible wait 500 setstate tank_panzer_flash default setstate tank_panzer_killer default playsound sound/weapons/rocket/rocket_fire.wav wait 50 alertentity gate_south setstate tank_panzer_flash invisible setstate tank_panzer_killer invisible wait 500 setstate tank_panzer_flash default setstate tank_panzer_killer default playsound sound/weapons/rocket/rocket_fire.wav wait 50 alertentity wall_south setstate tank_panzer_flash invisible setstate tank_panzer_killer invisible wait 500 accum 1 set 0 } trigger fire_exit { accum 1 abort_if_equal 1 accum 1 set 1 setstate tank_panzer_flash default setstate tank_panzer_killer default playsound sound/weapons/rocket/rocket_fire.wav wait 50 alertentity exit setstate tank_panzer_flash invisible setstate tank_panzer_killer invisible wait 500 accum 1 set 0 } } tank_ammotrgr { spawn { // Wait for host entity to spawn wait 100 // Attaches itself to a tag on the script_mover attachtotag tank1 tag_turret setstate tank_ammotrgr invisible } } tank_healthtrgr { spawn { // Wait for host entity to spawn wait 100 // Attaches itself to a tag on the script_mover attachtotag tank1 tag_turret setstate tank_healthtrgr invisible } } // ================================================ // TANK PANZER // ================================================ tank_panzer_flash { spawn { // Wait for host entity to spawn wait 1000 // Attaches itself to a tag on the script_mover attachtotag tank_upgrades tag_barrel_cntr setstate tank_panzer_flash invisible } } tank_panzer_killer { spawn { // Wait for host entity to spawn wait 100 attachtotag tank1 tag_turret setstate tank_panzer_killer invisible } } // \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ // ||||||||||[ ADDITIONAL TANK ENTITIES ]||||||||||||||||||||||||||||||||||| // /////////////////////////////////////////////////////////////////////////////////// tank1_construct { spawn { // Needed for the icon to reappear correctly on the command map constructible_class 2 } // Called when the repairs are starting buildstart final { } // Called when the repairs have failed decayed final { } // Called when the repairs have failed failed { } // Called when the repairs are done built final { // Resurrect the entity. This fills up its health and trigger the ::rebirth function alertentity tank1 } } tank1_disabler { spawn { } trigger run { // Call the function which controls the escort timeout trigger tank1 timer } } tank1_enabler { spawn { } trigger run { // Call the function which handles the escort trigger tank1 escort_trigger } } tank1_kill { spawn { } } tank1_timer { spawn { } } // \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ // ||||||||||[ SOUND REDIRECTS ]||||||||||||||||||||||||||||||||||| // /////////////////////////////////////////////////////////////////////////////////// // This block contains sound redirectors. Since commands are executed in order, // the only way to have multiple waits at the same time is to play them // through another scriptblock //====================================================================== tank1_sound { spawn { } trigger start { trigger tank1 sound_start wait 3400 trigger tank1 sound_move } trigger stop { trigger tank1 sound_stop wait 1400 trigger tank1 sound_idle } trigger rebirth { trigger tank1 sound_rebirth wait 1400 trigger tank1 sound_idle } trigger turret_burn { trigger tank1_turret sound_burn } trigger turret_fire { trigger tank1_turret sound_fire } trigger turret_turn_start { trigger tank1_turret sound_turn_start } trigger turret_turn_stop { trigger tank1_turret sound_turn_stop } } // ============================================================================================= // ||||||||||||||||||||[ TANK TURRET ]||||||||||||||||||||||||||||||| // ============================================================================================= tank1_turret { spawn { // Wait for host entity to spawn wait 100 attachtotag tank1 tag_turret // Attaches itself to a tag on the script_mover } //---------------------------------------------------------------------- // TURRET FIRING SEQUENCES //---------------------------------------------------------------------- trigger fire_at_target_1 { // Wait a little until starting sequence wait 1000 // Turn turret towards target trigger tank1_sound turret_turn_start faceangles 0 270 0 4000 // Adjust angles to match the target trigger tank1_sound turret_turn_stop wait 500 // Fire at target trigger tank1_sound turret_fire trigger tank1 anim_fire_start setstate tank1_flash default wait 50 setstate tank1_flash invisible wait 200 trigger tank1 anim_fire_stop // BUG: Apparently the entitys scriptblock is completely removed after its blown up the first time trigger target_01 blow_up wait 3000 trigger vo_manager tunnel_doors_vo //Play VO for target destroyed wait 50 // Turn turret back to target trigger tank1_sound turret_turn_start faceangles 0 0 0 4000 trigger tank1_sound turret_turn_stop // Wait a little until its ready to move again wait 500 // Unlock script trigger tank1 script_unlock } trigger fire_at_target_2 { // Wait a little until starting sequence wait 1000 // Turn turret towards target trigger tank1_sound turret_turn_start faceangles 0 90 0 4000 // Adjust angles to match the target trigger tank1_sound turret_turn_stop wait 500 // Fire at target trigger tank1_sound turret_fire trigger tank1 anim_fire_start setstate tank1_flash default wait 50 setstate tank1_flash invisible wait 200 trigger tank1 anim_fire_stop // BUG: Apparently the entitys scriptblock is completely removed after its blown up the first time trigger target_02 blow_up wait 2000 trigger vo_manager axis_defenses_destroyed_vo // Turn turret back to target trigger tank1_sound turret_turn_start faceangles 0 0 0 4000 trigger tank1_sound turret_turn_stop // Wait a little until its ready to move again wait 500 trigger autofire_trigger run // globalaccum 5 trigger_if_equal 1 tank1 all_clear2 //If AT gun has blow, skip to short route } trigger fire_at_target_3 { // Wait a little until starting sequence wait 1000 // Turn turret towards target trigger tank1_sound turret_turn_start faceangles 0 285 0 4000 // Adjust angles to match the target trigger tank1_sound turret_turn_stop wait 500 // Fire at target trigger tank1_sound turret_fire trigger tank1 anim_fire_start setstate tank1_flash default wait 50 setstate tank1_flash invisible wait 200 trigger tank1 anim_fire_stop // BUG: Apparently the entitys scriptblock is completely removed after its blown up the first time trigger target_03 blow_up wait 3000 trigger vo_manager depot_gates_vo //Play VO for target destroyed // Set objective Status wm_set_main_objective 3 0 wm_set_main_objective 3 1 wm_objective_status 1 1 1 wm_objective_status 1 0 2 wait 50 // trigger courtyard_check flag_show //turns on capturable flag wait 50 // Turn turret back to target trigger tank1_sound turret_turn_start faceangles 0 0 0 4000 trigger tank1_sound turret_turn_stop // Wait a little until its ready to move again wait 500 // Unlock script trigger tank1 script_unlock } // ============================================================================================= // ||||||||||||||||||||[ TURRET SOUNDS ]||||||||||||||||||||||||||||||| // ============================================================================================= trigger sound_fire { stopsound playsound sound/vehicles/tank/tank_fire.wav volume 300 } trigger sound_turn_start { stopsound playsound sound/vehicles/tank/turret_spin.wav looping volume 127 } trigger sound_turn_stop { stopsound playsound sound/vehicles/tank/turret_end.wav volume 96 } trigger sound_burn { stopsound playsound looping sound/praetoria_m2/fire.wav volume 127 } } // ============================================================================================= // ||||||||||||||||||||[ TURRET TARGETS ]||||||||||||||||||||||||||||||| // ============================================================================================= // // Slot Used for // ==== ======== // 0 State: // - Bit 0: Broken 0 = No 1 = Yes // //////////////////////////////// // TARGET 1: Tunnel Doors //////////////////////////////// target_01 { spawn { // Reset state bits accum 0 bitset 0 // Mark as not blown up } pain { } // If you need to notify other parts of the script that the target has been removed, then do it here. death { } // Called when the entity should be destroyed trigger blow_up { // Check if we have already been blown up accum 0 abort_if_not_bitset 0 // Abort if already blown up // Update state bits accum 0 bitreset 0 // Mark as blown up // Blow up alertentity target_01 } } //////////////////////////////// // TARGET 2: Anti-Tank Gun = MISS //////////////////////////////// target_02 { spawn { // Reset state bits accum 0 bitset 0 // Mark as not blown up // setstate target_02_static invisible //door chunks } pain { } // If you need to notify other parts of the script that the target has been removed, then do it here. death { // setstate target_02_static default //door chunks } // Called when the entity should be destroyed trigger blow_up { // Check if we have already been blown up accum 0 abort_if_not_bitset 0 // Abort if already blown up // Update state bits accum 0 bitreset 0 // Mark as blown up // Blow up alertentity target_02 } } //////////////////////////////// // TARGET 3: DEPOT YARD DOORS //////////////////////////////// target_03 { spawn { // Reset state bits accum 0 bitset 0 // Mark as not blown up // setstate target_03_static invisible //door chunks } pain { } // If you need to notify other parts of the script that the target has been removed, then do it here. death { } // Called when the entity should be destroyed trigger blow_up { // Check if we have already been blown up accum 0 abort_if_not_bitset 0 // Abort if already blown up // Update state bits accum 0 bitreset 0 // Mark as blown up // Blow up alertentity target_03 } } // \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ // ||||||||||[ TANK SCRIPT END ]||||||||||||||||||||||||||||||||||| // /////////////////////////////////////////////////////////////////////////////////// // \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ // ||||||||||[ VOICE SCRIPTING ]||||||||||||||||||||||||||||||||||| // /////////////////////////////////////////////////////////////////////////////////// vo_manager { trigger axis_defenses_destroyed_vo { //==================================================================================== wm_announce "Gun Control Defenses Destroyed!" // *----------------------------------- vo ------------------------------------------* //==================================================================================== wait 200 wm_teamvoiceannounce 0 "axis_defense_destroyed" wm_teamvoiceannounce 0 "axis_controls_defend" wm_teamvoiceannounce 1 "allies_defense_destroyed" wm_teamvoiceannounce 1 "allies_controls_dyn" // *---------------------------------------------------------------------------------* //==================================================================================== } trigger oops_vo { // *----------------------------------- vo ------------------------------------------* //==================================================================================== wait 200 wm_teamvoiceannounce 1 "allies_oops" // *---------------------------------------------------------------------------------* //==================================================================================== } trigger fire_gun_vo { // *----------------------------------- vo ------------------------------------------* //==================================================================================== wait 200 wm_teamvoiceannounce 0 "axis_atgun_fire" // *---------------------------------------------------------------------------------* //==================================================================================== } trigger tunnel_doors_vo { //==================================================================================== wm_announce "The Tank has breached the Bunker Tunnel Doors!" // *----------------------------------- vo ------------------------------------------* //==================================================================================== wait 200 wm_teamvoiceannounce 0 "axis_tunnel_destroyed" wm_teamvoiceannounce 1 "allies_tunnel_destroyed" // *---------------------------------------------------------------------------------* //==================================================================================== } trigger atgun_past_vo { //==================================================================================== wm_announce "The Tank is past the Anti Tank Gun!" // *----------------------------------- vo ------------------------------------------* //==================================================================================== wait 200 wm_teamvoiceannounce 0 "axis_atgun_past" wm_teamvoiceannounce 1 "allies_atgun_past" wait 200 wm_removeteamvoiceannounce 0 "axis_atgun_defend" wm_removeteamvoiceannounce 1 "allies_atgun_dyn" // *---------------------------------------------------------------------------------* //==================================================================================== } trigger turret_killed_vo { //==================================================================================== wm_announce "^1WARNING: ^3The Tank Turret has been Destroyed!" // *----------------------------------- vo ------------------------------------------* //==================================================================================== wm_teamvoiceannounce 0 "axis_tankgun_dest" wm_teamvoiceannounce 1 "axis_tankgun_dest" // *---------------------------------------------------------------------------------* //==================================================================================== } trigger tank_killed_vo { //==================================================================================== // *----------------------------------- vo ------------------------------------------* //==================================================================================== wait 200 wm_teamvoiceannounce 0 "axis_tank_dest" wm_teamvoiceannounce 1 "axis_tank_dest" // *---------------------------------------------------------------------------------* //==================================================================================== } trigger g_con_built_vo { //==================================================================================== // *----------------------------------- vo ------------------------------------------* //==================================================================================== wait 200 wm_teamvoiceannounce 0 "axis_controls_repaired" wm_teamvoiceannounce 1 "allies_controls_repaired" wm_teamvoiceannounce 1 "allies_controls_dyn" wm_addteamvoiceannounce 1 "allies_controls_dyn" wm_addteamvoiceannounce 0 "axis_controls_defend" wm_removeteamvoiceannounce 0 "axis_controls_build" // *---------------------------------------------------------------------------------* //==================================================================================== } trigger g_con_damaged_vo { //==================================================================================== // *----------------------------------- vo ------------------------------------------* //==================================================================================== wait 200 wm_teamvoiceannounce 0 "axis_controls_destroyed" wm_teamvoiceannounce 1 "allies_controls_destroyed" wm_removeteamvoiceannounce 0 "axis_controls_defend" wm_removeteamvoiceannounce 1 "allies_controls_dyn" trigger vo_manager g_con_rebuild_vo // *---------------------------------------------------------------------------------* //==================================================================================== } trigger g_con_rebuild_vo { //==================================================================================== // *----------------------------------- vo ------------------------------------------* //==================================================================================== wait 200 wm_teamvoiceannounce 0 "axis_controls_build" wm_addteamvoiceannounce 0 "axis_controls_build" // *---------------------------------------------------------------------------------* //==================================================================================== } trigger tank_need_repair { // *----------------------------------- vo ------------------------------------------* //==================================================================================== wait 200 wm_teamvoiceannounce 1 "tank_repair_need" // *---------------------------------------------------------------------------------* //==================================================================================== } trigger tank_need_covops_vo { //==================================================================================== // *----------------------------------- vo ------------------------------------------* //==================================================================================== wait 200 wm_teamvoiceannounce 1 "tank_covops_need" // *---------------------------------------------------------------------------------* //==================================================================================== } trigger tank_need_medic_vo { //==================================================================================== // *----------------------------------- vo ------------------------------------------* //==================================================================================== wait 200 wm_teamvoiceannounce 1 "tank_medic_need" // *---------------------------------------------------------------------------------* //==================================================================================== } trigger tank_need_fops_vo { //==================================================================================== // *----------------------------------- vo ------------------------------------------* //==================================================================================== wait 200 wm_teamvoiceannounce 1 "tank_fops_need" // *---------------------------------------------------------------------------------* //==================================================================================== } trigger tank_need_sol_vo { //==================================================================================== // *----------------------------------- vo ------------------------------------------* //==================================================================================== wait 200 wm_teamvoiceannounce 1 "tank_sol_need" // *---------------------------------------------------------------------------------* //==================================================================================== } trigger tank_need_eng_vo { //==================================================================================== // *----------------------------------- vo ------------------------------------------* //==================================================================================== wait 200 wm_teamvoiceannounce 1 "tank_eng_need" // *---------------------------------------------------------------------------------* //==================================================================================== } trigger tank_need_esc_vo { //==================================================================================== // *----------------------------------- vo ------------------------------------------* //==================================================================================== wait 200 wm_teamvoiceannounce 1 "tank_esc_need" // *---------------------------------------------------------------------------------* //==================================================================================== } trigger tank_esc_repdep_vo { //==================================================================================== wm_announce "^1WARNING: ^3The Tank Turret has been Destroyed!" // *----------------------------------- vo ------------------------------------------* //==================================================================================== wm_teamvoiceannounce 0 "axis_tankgun_dest" wm_teamvoiceannounce 1 "axis_tankgun_dest" //==================================================================================== wait 2000 wm_announce "^3Escort the Tank to the Repair Depot!" // *----------------------------------- vo ------------------------------------------* //==================================================================================== wait 200 wm_teamvoiceannounce 1 "allies_tank_esc_repdep" wm_addteamvoiceannounce 1 "allies_tank_esc_repdep" wm_removeteamvoiceannounce 0 "axis_tank_gates" wm_removeteamvoiceannounce 1 "allies_tank_gates" wm_removeteamvoiceannounce 1 "allies_tank_esc1" // *---------------------------------------------------------------------------------* //==================================================================================== } trigger tank_esc_repdep_arrived_vo { //==================================================================================== // *----------------------------------- vo ------------------------------------------* //==================================================================================== wait 200 wm_removeteamvoiceannounce 1 "allies_tank_esc_repdep" // *---------------------------------------------------------------------------------* //==================================================================================== } trigger tank_reinforce { //==================================================================================== wait 100 wm_announce "^3Upgrade the Tank" // *----------------------------------- vo ------------------------------------------* //==================================================================================== wait 200 wm_teamvoiceannounce 0 "axis_tank_reinforce_stop" wm_teamvoiceannounce 1 "allies_tank_reinforce" wm_addteamvoiceannounce 0 "axis_tank_reinforce_stop" wm_addteamvoiceannounce 1 "allies_tank_reinforce" // *---------------------------------------------------------------------------------* //==================================================================================== } trigger tank_reinforced { //==================================================================================== wm_announce "^2Tank Upgrade Complete!!!" // *----------------------------------- vo ------------------------------------------* //==================================================================================== wait 200 wm_removeteamvoiceannounce 1 "allies_tank_reinforce" wm_teamvoiceannounce 1 "allies_tank_reinforced" wm_teamvoiceannounce 0 "axis_tank_reinforced" wm_removeteamvoiceannounce 0 "axis_tank_reinforce_stop" wait 200 wm_teamvoiceannounce 1 "bto_2" wm_teamvoiceannounce 0 "bto_2" wait 500 // *---------------------------------------------------------------------------------* //==================================================================================== } trigger tank_depot_esc_vo { //==================================================================================== // *----------------------------------- vo ------------------------------------------* //==================================================================================== wait 200 wm_teamvoiceannounce 0 "axis_tank_gates" wm_teamvoiceannounce 1 "allies_tank_gates" wm_addteamvoiceannounce 0 "axis_tank_gates" wm_addteamvoiceannounce 1 "allies_tank_gates" wm_removeteamvoiceannounce 1 "allies_tank_esc_repdep" wm_removeteamvoiceannounce 1 "allies_tank_esc1" // *---------------------------------------------------------------------------------* //==================================================================================== } trigger fire_stop { //==================================================================================== // *----------------------------------- vo ------------------------------------------* //==================================================================================== wait 500 wm_teamvoiceannounce 1 "allies_gunfire_stop" wm_teamvoiceannounce 0 "axis_fire_gun" // *---------------------------------------------------------------------------------* //==================================================================================== } trigger depot_gates_vo { //==================================================================================== wm_announce "The Tank has Destroyed The Depot Gates!" // *----------------------------------- vo ------------------------------------------* //==================================================================================== wait 200 wm_teamvoiceannounce 0 "axis_gates_dest" wm_teamvoiceannounce 1 "allies_gates_dest" wm_removeteamvoiceannounce 0 "axis_tank_gates" wm_removeteamvoiceannounce 0 "axis_tank_stop1" wm_removeteamvoiceannounce 1 "allies_tank_gates" wm_removeteamvoiceannounce 1 "allies_tank_esc1" wm_removeteamvoiceannounce 1 "allies_tank_esc_repdep" trigger self rear_objectives_vo // *---------------------------------------------------------------------------------* //==================================================================================== } trigger rear_objectives_vo { //==================================================================================== wm_announce "^3Get the Fuel Tanks!" // *----------------------------------- vo ------------------------------------------* //==================================================================================== wait 200 wm_teamvoiceannounce 0 "axis_fuel_def" wm_teamvoiceannounce 1 "allies_fuel_get" wm_addteamvoiceannounce 0 "axis_fuel_def" wm_addteamvoiceannounce 1 "allies_fuel_get" // *---------------------------------------------------------------------------------* //==================================================================================== } trigger final_objective_vo { //==================================================================================== wm_announce "The Allies are escaping with the Fuel!" // *----------------------------------- vo ------------------------------------------* //==================================================================================== wait 200 wm_teamvoiceannounce 0 "axis_tank_stop2" wm_teamvoiceannounce 1 "allies_tank_esc2" wm_addteamvoiceannounce 0 "axis_tank_stop2" wm_addteamvoiceannounce 1 "allies_tank_esc2" wm_removeteamvoiceannounce 0 "axis_fuel_def" wm_removeteamvoiceannounce 1 "allies_fuel_get" // *---------------------------------------------------------------------------------* //==================================================================================== } }