Arma 3 Scripting

targetsQuery

  • Arma 3 v0.50
  • First in Arma 2 v1.00

Command · Markdown · JSON · original wiki page

Description

Returns sorted array of targets, known to the enquirer (including own troops), where the accuracy coefficient reflects how close the result matches the query. This command could be CPU intensive.

Syntax

enquirer targetsQuery [targetIgnore, targetSide, targetType, targetPosition, targetMaxAge]

Parameters:

Returns: Array of Arrays with [accuracy, target, targetSide, targetType, targetPosition, targetAge]

Examples

Example 1

Return all known targets for player:

_targets = player targetsQuery [objNull, sideUnknown, "", [], 0];

Example 2

Prioritise all known OPFOR targets and return targets less than 10 seconds old:

_targets = player targetsQuery [objNull, east, "", [], 10];

See also

targets · nearTargets · targetsAggregate · targetKnowledge · knowsAbout · reveal · forgetTarget · setTargetAge · getHideFrom