Overview
Excerpt |
---|
An array of Player objects |
...
describing each human/AI player slot on the current map regardless of whether those slots have been assigned players for the current game. |
...
The data is based on either the settings in a campaign file, or the game settings from a skirmish or multiplayer game:
The index of each element in the array relates to the player ID. So the data for player 0 will be in playerData[0] and so on.
Properties
Each (numerically referenced) element in the array contains an object with the following properties:
Property | Description |
---|---|
difficulty | The player's difficulty level (only applicable for AI players). |
colour | The player's colour name, as a string. |
position | The map position (integer) to which the player is assigned. You can find it's x,y co-ordinates by cross-referencing against the startPositions array. |
team | The team to which the player is assigned, if applicable. |
Examples
...