Versions Compared

Key

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

Overview

Excerpt

Determine whether two players are allies with each other.

Syntax

Code Block
themeEclipse
languagejavascript
linenumberstrue
var returnValue = allianceExistsBetween(playerA, playerB);

Parameters

ParameterTypeMandatoryDescription
playerANumber(tick)The ID of the first player
playerBNumber(tick)The ID of the second player

Return value

ValueTypeDescription
trueBooleanIndicates that the two players are allied with each other
falseBooleanThe two players are enemies of each other

Example

Code Block
themeEclipse
languagejavascript
titleShould I attack the other player?
linenumberstrue
if (!allianceExistsBetween(me,theOtherPlayer)) attackTheOtherPlayer();

See Also