Max users

From MyGamingTalk
Jump to navigation Jump to search
Omni-Bot_Map_Scripting Max Users


Within a map sometimes you will want to change the number of bots that will focus on a goal.

Lll that is required is to use the command "Util.SetMaxUsers".


Have a look at this example taken from a standard script

 
global OnMapLoad = function()
{
        // Max users per goal
	Util.SetMaxUsers( 1, "ATTACK_.*" );
	Util.SetMaxUsers( 1, "DEFEND_.*" );
	Util.SetMaxUsers( 1, "GRENADE_.*" );
	Util.SetMaxUsers( 1, "MOUNTMG42_.*" );

};


The number is purely the number of bots then in the quote marks the name of the mapgoal(s). Use the same method for any other mapgoals you might what to change increase or decrease.

Although this example is from the OnMapLoad section you can also use the same command in any "function( trigger )" of the Global Map section.