targetsAggregate: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - " \| ?\[\[([a-zA-Z0-9]+)\]\] *\|x1=" to " |r1= $1 |x1=")
m (Some wiki formatting)
Line 1: Line 1:
{{RV|type=command
{{RV|type=command


| arma2
|game1= arma2
|1.00
|version1= 1.00


|game2= arma2oa
|game2= arma2oa
Line 13: Line 13:
|version4= 0.50
|version4= 0.50


| Aggregate candidates.
|descr= Aggregate candidates.


|gr1= Object Manipulation
|gr1= Object Manipulation


| [speaker, side, unit, place, time] '''targetsAggregate''' candidates
|s1= [speaker, side, unit, place, time] [[targetsAggregate]] candidates


|p1= [speaker, side, unit, place, time]: [[Array]]
|p1= [speaker, side, unit, place, time]: [[Array]]


|p2= candidates: [[Array]] -  array of targets in the following format:
|p2= candidates: [[Array]] -  array of targets in the following format:
<nowiki>[</nowiki>[accuracy, target, targetSide, targetType, targetPosition, targetAge],...] where:
[<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)
* accuracy: [[Number]] - a coefficient, which reflects how close the returned result to the query filter. Range: 0..1, 1 being the best match
* target: [[Object]] - the actual target object
* target: [[Object]] - the actual target object
* targetSide: [[Side]] - side of the target
* targetSide: [[Side]] - side of the target
Line 32: Line 32:
|r1= [[Array]]
|r1= [[Array]]


|x1= <pre>_aggregation = [player, sideEnemy, "", [], 0] targetsAggregate (player targetsQuery [objNull, sideUnknown, "", [], 0])</pre>could return something like this: <br>
|x1= <code>_aggregation = [<nowiki/>[[player]], [[sideEnemy]], "", [], 0] [[targetsAggregate]] ([[player]] [[targetsQuery]] [<nowiki/>[[objNull]], [[sideUnknown]], "", [], 0]);
<nowiki>[[["COUNT0",1],["SIDE0",WEST],["UNIT0","B_Soldier_F"],["PLACE0",[[<null>,<null>],0,<null>]],["TIME0",[-0.9,-0.9]],["UCOUNT0",1],["UTYPE0","...</nowiki>
{{codecomment|<nowiki>/*
returns e.g
[
[
["COUNT0", 1],
["SIDE0", WEST],
["UNIT0", "B_Soldier_F"],
["PLACE0", [[<null>,<null>], 0, <null>]],
["TIME0", [-0.9, -0.9]],
["UCOUNT0", 1],
["UTYPE0", ...
]
]
*/</nowiki>}}</code>
 


|seealso= [[targetsQuery]], [[forgetTarget]]
|seealso= [[targetsQuery]], [[forgetTarget]]
}}
}}
{{GameCategory|arma2|Scripting Commands}}
{{GameCategory|arma3|Scripting Commands}}
{{GameCategory|tkoh|Scripting Commands}}

Revision as of 17:16, 12 June 2021

Hover & click on the images for description

Description

Description:
Aggregate candidates.
Groups:
Object Manipulation

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 being the 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]); /* returns e.g [ [ ["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