(info) Other great resources: Official JS API docs, Scripting Forum

allianceExistsBetween()

Determine whether two players are allies with each other...

 

Syntax

var returnValue = allianceExistsBetween(playerA, playerB);

Parameters

ParameterTypeMandatoryDescriptionGame version
playerANumber(tick)The ID of the first player3.1 Beta 1
playerBNumber(tick)The ID of the second player3.1 Beta 1

Return value

ValueTypeDescriptionGame verison
trueBooleanIndicates that the two players are allied with each other3.1 Beta 1
falseBooleanThe two players are enemies of each other3.1 Beta 1
<error>ErrorOne of the players specified does not exist3.1 Beta 1

Example

Should I attack the other player?
if (!allianceExistsBetween(me, theOtherPlayer)) attackTheOtherPlayer();
Availability 3.1 B1+

Requires:

  • Warzone 3.1 Beta 1 or above.
Contents

Jump to:

See also

Related articles:

  • setAlliance() – form or break an alliance between two players
  • alliancesType – indicates which alliance mode is selected for the current game
  • maxPlayers – defines how many players are on the map
  • playerData[] – some extra info about players, including what team they are in (if applicable)
  • Players & Alliances – other player / alliance related stuff

Â