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 5 Next »

Stores the player ID your script is associated with...

 

Syntax

me

Values

The value of me will be an integer in the range 0 ≤ me ≤ Math.max(scavengerPlayer, 0).

  • Player 0 is always the human game host.
  • There can be up to 9 additional normal (human or AI) players in a game (player IDs 1 → maxPlayers).
  • If scavengers are enabled, there will also be an additional scavengerPlayer.

In Warzone 3.2, the value of me was updated so that hackChangeMe() could be used to set a value of -1. When this happens, the script will receive almost all events from all players. This is useful in 'extra' scripts, often used to manage missions, as they can get a much more comprehensive view on game state.

An additional global, selectedPlayer, allows you to determine which of the players the local host human is playing as.

Example

Get a list of my droids...
// get a list of my droids
var myDroids = enumDroid(me);
Availability 3.1 B1+

Requires:

  • Warzone 3.1 Beta 1 or above
  • Updated in 3.2 to allow value of -1
Contents

Jump to:

 

  • No labels