(info) Other great resources: Official JS API docs, Scripting Forum

maxPlayers

Defines the maximum number of human/AI player slots on the current map, regardless of whether those slots are filled in the current game.

 

Notes

Scavenger faction is not a normal player slot as far as Warzone is concerned. For more information, see scavengerPlayer.

Example

Get list of droids for all players
// go through each player in turn and get a list of their droids
for (var i = 0; i < maxPlayers; i++) {
  var droids = enumDroid(i); // get droids for player
  // do stuff
}
Does not include scavenger player.
See scavengerPlayer and scavengers. 

Availability

This global is available for:

  • Warzone 3.1 Beta 1 and above

See also

Related API features:

You might also find useful:

Â