Sniper and Panzer maps: Difference between revisions

From MyGamingTalk
m (1 revision imported)
 
m (1 revision imported)
 
(No difference)

Latest revision as of 08:02, 13 February 2023

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.