Arma 3 Scripting

aimedAtTarget

  • Arma 3 v0.50
  • First in Arma 2: Operation Arrowhead v1.50

Command · also in Weapons · Markdown · JSON · original wiki page

Description

Returns how good a vehicle's weapon is aimed at the target.

Syntax

vehicle aimedAtTarget [target, weapon]

Parameters:

Returns: Number in range 0..1 - 0 if no weapons or if weapon was provided and not found

Examples

Example 1

_aimingQuality = heli aimedAtTarget [target];

Example 2

_aimingQuality = heli aimedAtTarget [target, "M197"];

See also

fireAtTarget

Community notes

Killzone_Kid

The command doesn't work with soldier weapons, only vehicle weapons (in Arma 3 at least). The return value is either 1 or 0, very rarely the value falls in between. 1 doesn't mean you are going to hit the target, while 0 means you're definitely off.