targets

From Bohemia Interactive Community
Revision as of 13:11, 22 February 2017 by Warka (talk | contribs) (Created page with "{{Command|= Comments ____________________________________________________________________________________________ | arma3dev |= Game name |1.67|= Game version |arg= global|...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
-wrong parameter ("arma3dev") defined!-[[:Category:Introduced with arma3dev version 1.67|1.67]]
Hover & click on the images for description

Description

Description:
Retrives list of given unit targets matching specified filter. If the filter is not specified, all targets are returned.
Groups:
Uncategorised

Syntax

Syntax:
unit targets [sides,maxDistance,maxAge,alternateCenter]
Parameters:
unit: Object - unit which target knowledge is retrieved
sides: Array - array of accepted sides; if [] then this filter is ignored and all sides are considered
maxDistance: Number - max. distance based on target's expected position (distance is measured in 2D)
maxAge: Number - max. target age; targets that are known to unit for longer then maxAge are ignored
alternateCenter: Array - alternate (2D or 3D) position used for distance check (distance is measured in 2D); if not specified unit position is being used
Return Value:
Array - unit's targets matching the criteria

Examples

Example 1:
_targets = _unit targets [[[east,sideEnemy]], 300]; //all east or renegade targets in 300m
Example 2:
_targets = _unit targets [[], 300]; //all targets in 300m
Example 3:
_targets = _unit targets []; //all targets

Additional Information

See also:
nearTargetstargetsQueryrevealSide

Notes

Report bugs on the Feedback Tracker and/or discuss them on the Arma Discord or on the Forums.
Only post proven facts here! Add Note

[[Category:Introduced with arma3dev version 1.67]][[ Category: arma3dev: New Scripting Commands | TARGETS]][[ Category: arma3dev: Scripting Commands | TARGETS]]

Notes

Bottom Section