This AI is still in early stages of development.
Players Objects
The objects returned by the Players API are enhanced versions of Player objects...
Properties
Property | Settable | Type | Notes | API Version |
|---|---|---|---|---|
id | Number | The id of the player. Note: For the scavenger player, their id will be >= maxPlayers (see scavengerPlayer for more info) | 0.1 | |
type | Constant | Note: The constant is backported by the Players API for Warzone 3.1 Beta 10 and earlier, so it will always be available regardless of Warzone version. | 0.1 | |
name | String | What is the player's name?
| 0.1 | |
isAI | Boolean Undefined | Is the player an AI?
| 0.1 | |
isScavenger | Boolean | Is the player the Scavenger Faction faction?
| 0.1 | |
isHuman | Boolean Undefined | Is the player human?
| 0.1 | |
isHost | Boolean | Is the player the game host?
| 0.1 | |
isVacant | Boolean | Is the player slot vacant?
A player is considered vacant if they are not alive when the Players API initialises (either at the start of a new game, or when loading a saved game). | 0.1 | |
difficulty | Constant | What Difficulty Level is the player? Note: Confirmed human players will have a difficulty of HARD, ambiguous human players will have a difficulty of MEDIUM. | 0.1 | |
colour | Object | An object describing the colour associated with the player – it has two properties:
The Scavenger faction has a custom colour defined:
See Colour Palette for possible values of each property. You can use _(player.colour.name) to localise the colour name. | 0.1 | |
team | Object | An object describing the team the player is in – it has two properties:
The Scavenger faction has a custom team defined:
The team is always specified, regardless of alliancesType mode:
Note: Maps can specify defaults for teams, see <mapname>.ini for details. | 0.1 | |
isAlly | 3.1 3.2+ | Boolean | Is the player an ally of the script player (me)?
On Warzone 3.2 and above, you can set this value, for example: | 1.0 |
isEnemy | 3.1 3.2+ | Boolean | Is the player an enemy of the script player (me)?
On Warzone 3.2 and above, you can set this value, for example: | 1.0 |
isAlive | Boolean | Is the player "Alive" according to game rules?
| 0.1 | |
position | Number Undefined | What map position did the player start in?
| 0.1 | |
isSelected | Boolean | Has the localhost human player selected this player?
For more information, see selectedPlayer. | 0.1 |