targetsAggregate: Difference between revisions
Jump to navigation
Jump to search
Lou Montana (talk | contribs) m (Text replacement - "Category:Scripting Commands ArmA2" to "Category:Scripting Commands Arma 2") |
(added more specific info) |
||
Line 14: | Line 14: | ||
|p1= [speaker, side, unit, place, time]: [[Array]] |PARAMETER1= | |p1= [speaker, side, unit, place, time]: [[Array]] |PARAMETER1= | ||
|p2= candidates: [[Array]] | |p2= candidates: [[Array]] - array of targets in the following format: | ||
<nowiki>[</nowiki>[accuracy, target, targetSide, targetType, targetPosition, targetAge],...] where: | |||
| | * accuracy: [[Number]] - a coefficient, which reflects how close the returned result to the query filter. Range: 0 - 1 (1 - best match) | ||
* target: [[Object]] - the actual target object | |||
* targetSide: [[Side]] - side of the target | |||
* targetType: [[String]] - target [[typeOf]] | |||
* targetPosition: [[Array]] - [x,y] of the target | |||
* targetAge: [[Number]] - the actual target age in seconds (can be negative)|PARAMETER2= | |||
| [[Array]] |RETURNVALUE= | | [[Array]] |RETURNVALUE= | ||
|x1 = <pre>_aggregation = [player, sideEnemy, "", [], 0] targetsAggregate (player targetsQuery [objNull, sideUnknown, "", [], 0])</pre>could return something like this: <br> | |||
|x1= <pre>_aggregation = [ | <nowiki>[[["COUNT0",1],["SIDE0",WEST],["UNIT0","B_Soldier_F"],["PLACE0",[[<null>,<null>],0,<null>]],["TIME0",[-0.9,-0.9]],["UCOUNT0",1],["UTYPE0","...</nowiki>|EXAMPLE1= | ||
____________________________________________________________________________________________ | ____________________________________________________________________________________________ |
Revision as of 09:08, 18 February 2020
Description
- Description:
- Aggregate candidates.
- Groups:
- Uncategorised
Syntax
- Syntax:
- [speaker, side, unit, place, time] targetsAggregate candidates
- Parameters:
- [speaker, side, unit, place, time]: Array
- candidates: Array - array of targets in the following format:
[[accuracy, target, targetSide, targetType, targetPosition, targetAge],...] where:
- accuracy: Number - a coefficient, which reflects how close the returned result to the query filter. Range: 0 - 1 (1 - best match)
- target: Object - the actual target object
- targetSide: Side - side of the target
- targetType: String - target typeOf
- targetPosition: Array - [x,y] of the target
- targetAge: Number - the actual target age in seconds (can be negative)
- Return Value:
- Array
Examples
- Example 1:
_aggregation = [player, sideEnemy, "", [], 0] targetsAggregate (player targetsQuery [objNull, sideUnknown, "", [], 0])
could return something like this:
[[["COUNT0",1],["SIDE0",WEST],["UNIT0","B_Soldier_F"],["PLACE0",[[<null>,<null>],0,<null>]],["TIME0",[-0.9,-0.9]],["UCOUNT0",1],["UTYPE0","...
Additional Information
- See also:
- targetsQueryforgetTarget
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