Max users

From MyGamingTalk
Revision as of 09:02, 13 February 2023 by Palota (talk | contribs) (1 revision imported)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
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

<syntaxhighlight lang="java"> global OnMapLoad = function() {

       // Max users per goal

Util.SetMaxUsers( 1, "ATTACK_.*" ); Util.SetMaxUsers( 1, "DEFEND_.*" ); Util.SetMaxUsers( 1, "GRENADE_.*" ); Util.SetMaxUsers( 1, "MOUNTMG42_.*" );

}; </syntaxhighlight>


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.