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



Introduced in

Version:1.00

Description

Description: Returns the objects the weapon is aiming at, or an empty array if none. Note that for turrets that are adjusted for range (eg, tank turrets), the optic view is used (what is being aimed at), not the barrel direction (pointing upward to compensate for range).

The object aimed at must have a geometry LOD defined, in order to be detected. Some helper objects (e.g. the marker arrows) do not have a geometry defined, and will therefore be ignored.

Syntax

Syntax: vehicle weaponAimingAt [weaponname,maxdist,radius]
Parameters:
  • vehicle: Object - unit or vehicle that is aiming
  • weaponname: String - weapon to be evaluated
  • maxdist: Number - maximum distance to consider
  • radius: Number - radius to consider (non-functional)
Return Value: Array - array of targets

Examples

Examples:
_targets = _vehicle weaponAimingAt ["M16",500,1]"

Additional Information

See also: aimedAtTarget, cursorTarget
Multiplayer: 
Problems: 

Notes