targets: Difference between revisions
Lou Montana (talk | contribs) (Add default values) |
BrettMayson (talk | contribs) mNo edit summary |
||
| Line 19: | Line 19: | ||
|p3= maxDistance: [[Number]] - (Optional, default -1) maximum '''2D''' distance based on target's expected position; use 0 to ignore the filter | |p3= maxDistance: [[Number]] - (Optional, default -1) maximum '''2D''' distance based on target's expected position; use 0 to ignore the filter | ||
|p4= sides: [[Array]] - (Optional, default {{hl|[]}}) array of accepted sides; use {{hl|[]}} to ignore the side filter | |p4= sides: [[Array]] of [[Side]]s - (Optional, default {{hl|[]}}) array of accepted sides; use {{hl|[]}} to ignore the side filter | ||
|p5= maxAge: [[Number]] - (Optional, default 0) max. target age, targets that are known to unit for longer than maxAge are ignored; use 0 to ignore the maxAge filter | |p5= maxAge: [[Number]] - (Optional, default 0) max. target age, targets that are known to unit for longer than maxAge are ignored; use 0 to ignore the maxAge filter | ||
Latest revision as of 12:46, 1 January 2026
Description
- Description:
- Retrieves list of given unit targets matching specified filter. If the filter is not specified, all targets are returned.
- Groups:
- Object Detection
Syntax
- Syntax:
- unitOrGroup targets [enemyOnly, maxDistance, sides, maxAge, alternateCenter]
- Parameters:
- unitOrGroup: Object or
2.12 Group - unit or group which target knowledge is retrieved - enemyOnly: Boolean - (Optional, default false) true to include only enemy targets, false to include all targets
- maxDistance: Number - (Optional, default -1) maximum 2D distance based on target's expected position; use 0 to ignore the filter
- sides: Array of Sides - (Optional, default []) array of accepted sides; use [] to ignore the side filter
- maxAge: Number - (Optional, default 0) max. target age, targets that are known to unit for longer than maxAge are ignored; use 0 to ignore the maxAge filter
- alternateCenter: Array - (Optional, default unitOrGroup's position) alternate (2D or 3D) position used for 2D distance check
- Return Value:
- Array - unitOrGroup's targets matching the criteria
Examples
- Example 1:
- Example 2:
- Example 3:
Additional Information
- See also:
- targetsQuery nearTargets targetsAggregate targetKnowledge knowsAbout reveal forgetTarget setTargetAge getHideFrom side
Notes
-
Report bugs on the Feedback Tracker and/or discuss them on the Arma Discord.
Only post proven facts here! Add Note