targetsQuery: Difference between revisions
Jump to navigation
Jump to search
Lou Montana (talk | contribs) m (Text replacement - " +" to " ") |
Lou Montana (talk | contribs) m (Text replacement - " \| *(([^=\| ]+)('''|\[\[)([^=\| ]+)) * +\|p1=" to " |s1= $1 |p1=") |
||
Line 17: | Line 17: | ||
| 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. | | 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. | ||
| enquirer '''targetsQuery''' [targetIgnore, targetSide, targetType, targetPosition, targetMaxAge] | |s1= enquirer '''targetsQuery''' [targetIgnore, targetSide, targetType, targetPosition, targetMaxAge] | ||
|p1= enquirer: [[Object]] - For whom the query will be made | |p1= enquirer: [[Object]] - For whom the query will be made |
Revision as of 23:25, 12 June 2021
Description
- Description:
- Description needed
- Groups:
- Object Detection
Syntax
- Syntax:
- enquirer targetsQuery [targetIgnore, targetSide, targetType, targetPosition, targetMaxAge]
- Parameters:
- enquirer: Object - For whom the query will be made
- [targetIgnore, targetSide, targetType, targetPosition, targetMaxAge]: Array - Query
- targetIgnore: Object - Target object to exclude from results. objNull - return every target
- targetSide: Side - Desired side of the target. sideUnknown - any side
- targetType: String - Desired target typeOf. "" - any type
- targetPosition: Array - Desired target position in format of Position2D or Position3D (only [x,y] is considered). Position tolerance is 200m from the actual position of the target. [] - any position
- targetMaxAge: Number - Desired max age of the target. This will limit returned results to the targets younger than specified age. 0 - any age
- Return Value:
- Return value needed
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];
Additional Information
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