Page tree
Skip to end of metadata
Go to start of metadata


Introduced in

Version:1.00

Description

Description:

Count how many units (in a specified list) are considered an enemy to the given unit.

If the getFriend of the checking unit side is less than 0.6 towards the checked unit side, then it is considered an enemy. The friendliness level in the other direction is not considered.

Syntax

Syntax:unit countEnemy enemies
Parameters:
  • unit: Object - Unit whose enemies should be counted.
  • enemies: Array - Array of units that should be considered for the count.
Return Value:Number

Examples

Examples:
_enemies = player countEnemy (list trigger1)

Additional Information

See also: countFriendly, countSide, countUnknown
Multiplayer: 
Problems: 

Notes