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

Overview

Determine whether two players are allies with each other.

Syntax

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

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

See Also

 

  • No labels