Sniper and Panzer maps

From MyGamingTalk
Revision as of 08:02, 13 February 2023 by Palota (talk | contribs) (1 revision imported)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Omni-Bot_Map_Scripting Sniper and Panzer Scripting


Sniper

Sniper Scripts only need to tell the bots to snipe.

Create a new file using the map name "mapname.gm" and copy the script below.

 
global Map = 
{ 
         SnipeMap = true, 
}; 
 
global OnMapLoad = function() 
{ 
         SetMapGoalProperties("SNIPE.*", { MinCampTime=30, MaxCamptime=50,}); 
         Util.LimitToTeam( TEAM.AXIS, "SNIPE_axis.*" ); 
         Util.LimitToTeam( TEAM.ALLIES, "SNIPE_allied.*" ); 
         Util.MapDebugPrint( "Omni-bot map script for " + GetMapName() + " executed.", true );
}; 
  
global OnBotJoin = function( bot ) 
{ 
         Util.ChangeToSniperWeapons(bot); 
};


The only thing to do is edit the goal names in this example "SNIPE_axis.*" & "SNIPE_allied.*" if you have named you goals differently & change the camptime if you want.

Panzer

Panza Scripts only need to tell the bots that it is a panza map.

Create a new file using the map name "mapname.gm" and copy the script below.

 
global Map =  
{ 
        PanzerMap = true, 
}; 

global OnBotJoin = function(bot) 
{ 
        ETUtil.ChangeToPanzer(bot); 
};


Because there are no goals in panza maps there is nothing else to do.