Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 5.3

Overview

Excerpt

Returns an array of all enemy structures of a given type, optionally filtered to visibility of lookingPlayer.

Availability

Warzone 3.1 Beta 1 and above.

(warning) Requires getEnemyPlayerIDs()

 

Code

Code Block
theme

...

RDark
languagejavascript
linenumberstrue
function enumEnemyStruct(structure,

...

viewer) {
  var list = [];
  var enemies = getEnemyPlayerIDs();
  enemies.forEach(function(enemy) {
    if (!!

...

viewer) {
      list = list.concat(enumStruct(enemy,structure,

...

viewer));
    } else {
      list = list.concat(enumStruct(enemy,structure));
    }
  });
  return list;
}

Example

Code Block
theme

...

RDark
languagejavascript
linenumberstrue
// get a list of enemy oil derricks
var enemyDerricks = enumEnemyStruct(RESOURCE_EXTRACTOR);
Div
classbox

Availability

Requires:

Div
classbox

See also

Related articles:

...