//========================================================================================== // // town.gm // // Who When What //------------------------------------------------------------------------------------------ // ^1[UJE]^3Niek 25 December 2013 Initial Script // //========================================================================================== // global Map = { Debug = 0, // please set to zero before distributing your script ShowMovers = false, howitzer_ammo_boxes_Dyno = 0, howitzer_mg_Dyno = 0, ladder_Dyno = 0, side_door_Dyno = 0, howitzer_mg_Built = function( trigger ) { if ( TestMap ) { return; } Util.MapDebugPrint( "howitzer_mg_Built" ); }, ladder_Built = function( trigger ) { if ( TestMap ) { return; } Util.MapDebugPrint( "ladder_Built" ); }, howitzer_ammo_boxes_Planted = function( trigger ) { if ( TestMap ) { return; } Map.howitzer_ammo_boxes_Dyno += 1; Util.MapDebugPrint( "howitzer_ammo_boxes_Planted" ); }, howitzer_mg_Planted = function( trigger ) { if ( TestMap ) { return; } Map.howitzer_mg_Dyno += 1; Util.MapDebugPrint( "howitzer_mg_Planted" ); }, ladder_Planted = function( trigger ) { if ( TestMap ) { return; } Map.ladder_Dyno += 1; Util.MapDebugPrint( "ladder_Planted" ); }, side_door_Planted = function( trigger ) { if ( TestMap ) { return; } Map.side_door_Dyno += 1; Util.MapDebugPrint( "side_door_Planted" ); }, howitzer_ammo_boxes_Defused = function( trigger ) { if ( TestMap ) { return; } Map.howitzer_ammo_boxes_Dyno -= 1; Util.MapDebugPrint( "howitzer_ammo_boxes_Defused" ); }, howitzer_mg_Defused = function( trigger ) { if ( TestMap ) { return; } Map.howitzer_mg_Dyno -= 1; Util.MapDebugPrint( "howitzer_mg_Defused" ); }, ladder_Defused = function( trigger ) { if ( TestMap ) { return; } Map.ladder_Dyno -= 1; Util.MapDebugPrint( "ladder_Defused" ); }, side_door_Defused = function( trigger ) { if ( TestMap ) { return; } Map.side_door_Dyno -= 1; Util.MapDebugPrint( "side_door_Defused" ); }, howitzer_ammo_boxes_Destroyed = function( trigger ) { if ( TestMap ) { return; } Map.howitzer_ammo_boxes_Dyno = 0; Util.MapDebugPrint( "howitzer_ammo_boxes_Destroyed" ); }, howitzer_mg_Destroyed = function( trigger ) { if ( TestMap ) { return; } Map.howitzer_mg_Dyno = 0; Util.MapDebugPrint( "howitzer_mg_Destroyed" ); }, ladder_Destroyed = function( trigger ) { if ( TestMap ) { return; } Map.ladder_Dyno = 0; Util.MapDebugPrint( "ladder_Destroyed" ); }, side_door_Destroyed = function( trigger ) { if ( TestMap ) { return; } Map.side_door_Dyno = 0; Util.MapDebugPrint( "side_door_Destroyed" ); }, }; global OnMapLoad = function() { if ( TestMapOn ) { Util.AutoTestMap(); } // Register callback functions OnTrigger( "MISSING_STRING", Map.howitzer_mg_Built ); OnTrigger( "MISSING_STRING", Map.ladder_Built ); OnTrigger( "Planted at the MISSING_STRING.", Map.howitzer_ammo_boxes_Planted ); OnTrigger( "Planted at the MISSING_STRING.", Map.howitzer_mg_Planted ); OnTrigger( "Planted at the MISSING_STRING.", Map.ladder_Planted ); OnTrigger( "Planted at the MISSING_STRING.", Map.side_door_Planted ); OnTrigger( "Defused at the MISSING_STRING.", Map.howitzer_ammo_boxes_Defused ); OnTrigger( "Defused at the MISSING_STRING.", Map.howitzer_mg_Defused ); OnTrigger( "Defused at the MISSING_STRING.", Map.ladder_Defused ); OnTrigger( "Defused at the MISSING_STRING.", Map.side_door_Defused ); OnTrigger( "MISSING_STRING", Map.howitzer_ammo_boxes_Destroyed ); OnTrigger( "MISSING_STRING", Map.howitzer_mg_Destroyed ); OnTrigger( "MISSING_STRING", Map.ladder_Destroyed ); OnTrigger( "MISSING_STRING", Map.side_door_Destroyed ); //~Util.DisableGoal( ".*", true ); // all but routes //~SetAvailableMapGoals( TEAM.AXIS, true, "ATTACK_.*" ); //~SetAvailableMapGoals( TEAM.ALLIES, true, "ATTACK_.*" ); // Max users per goal //Util.SetMaxUsers( 1, "DEFEND_.*" ); //Util.SetMaxUsers( 1, "GRENADE_.*" ); //Util.SetMaxUsers( 1, "MOUNTMG42_.*" ); // Camp times SetMapGoalProperties( "MOUNTMG42_.*", {MinCampTime=15, MaxCampTime=90} ); SetMapGoalProperties( "MOBILEMG42_.*", {MinCampTime=10, MaxCampTime=60} ); Util.MapDebugPrint( "Omni-bot map script for " + GetMapName() + " executed." ); }; global OnBotJoin = function( bot ) { // Uncomment for shootable breakables //~bot.TargetBreakableDist = 90.0; // Only set MaxViewDistance on maps with limited sight (e.g. fog) //~bot.MaxViewDistance = 2400; }; global InitializeRoutes = function() { MapRoutes = { BUILD_ladder = { }, BUILD_howitzer_mg = { }, PLANT_ladder = { }, PLANT_howitzer_ammo_boxes = { }, PLANT_howitzer_mg = { }, PLANT_side_door = { }, }; Util.Routes(MapRoutes); };