Other great resources: Official JS API docs, Scripting Forum

Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Next »

Overview

An array of objects that describe each player on the map.

By inspecting the player data stored in this array, you can determine some useful information about your opponents/allies.

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:

PropertyDescription
difficultyThe player's difficulty level (only applicable for AI players).
colourThe player's colour name, as a string.
positionThe 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.
teamThe team to which the player is assigned, if applicable.

Examples

To follow

  • No labels