Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Excerpt

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

 

Syntax

Code Block
themeRDark
languagejavascript
linenumberstrue
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

Code Block
themeEclipseRDark
languagejavascript
titleGet a list of my droids...
linenumberstrue
// get a list of my droids
var myDroids = enumDroid(me);
Div
classbox
Availability
Status
colourGreen
title3.1 b1+

Requires:

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

Jump to:

Table of Contents
maxLevel5