targetKnowledge: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - "\|game([0-9])= *([^ ]+) * +\|version([0-9])= *([^ ]+) * " to "|game$1=$2 |version$3=$4 ")
m (Text replacement - "<sqf>([^↵][^\/]*↵[^\/]*)<\/sqf>" to "<sqf> $1 </sqf>")
 
(18 intermediate revisions by 3 users not shown)
Line 4: Line 4:
|version1= 1.50
|version1= 1.50


|gr1= Object Manipulation
|gr1= Object Detection


|descr= Returns unit's knowledge about target.
|descr= Returns unit's knowledge about target.


|s1= unit '''targetKnowledge''' target
|s1= unit [[targetKnowledge]] target


|p1= unit: [[Object]]
|p1= unit: [[Object]]
Line 14: Line 14:
|p2= target: [[Object]]
|p2= target: [[Object]]


|r1= [[Array]] - Array in format
|r1= [[Array]] in format [knownByGroup, knownByUnit, lastSeen, lastThreat, side, errorMargin, position]:
* 0: [[Boolean]] - Target known by group
* knownByGroup: [[Boolean]] - target known by group
* 1: [[Boolean]] - Target known by the unit
* knownByUnit: [[Boolean]] - target known by the unit
* 2: [[Number]] - Last time the target was seen by the unit
* lastSeen: [[Number]] - last time the target was seen by the unit
* 3: [[Number]] - Last time the target endangered the unit
* lastThreat: [[Number]] - last time the target endangered the unit
* 4: [[Side]] - Target side
* side: [[Side]] - target side
* 5: [[Number]] - Position error
* errorMargin: [[Number]] - position error
* 6: [[Array]] - Target position in format [[Position]]
* position: [[Array]] - target position in format [[Position]]
* {{GVI|arma3|2.18}}: [[Boolean]] - target is ignored ([[ignoreTarget]])


|x1= <code>_allInfo = _soldierOne [[targetKnowledge]] _jeepOne;</code>
|x1= <sqf>
private _allInfo = _soldierOne targetKnowledge _jeepOne;
_allInfo params ["_knownByGroup", "_knownByUnit", "_lastSeen", "_lastThreat", "_side", "_errorMargin", "_position"];
</sqf>


|x2= <code>_posError = (_soldierOne [[targetKnowledge]] _jeepOne) [[select]] 5;</code>
|x2= <sqf>private _posError = (_soldierOne targetKnowledge _jeepOne) select 5;</sqf>


|seealso= [[knowsAbout]], [[targetsQuery]], [[targetsAggregate]], [[nearTargets]], [[reveal]], [[getHideFrom]]
|seealso= [[knowsAbout]] [[targets]] [[targetsQuery]] [[nearTargets]] [[targetsAggregate]] [[reveal]] [[forgetTarget]] [[setTargetAge]] [[getHideFrom]] [[ignoreTarget]]
}}
}}

Latest revision as of 11:34, 3 September 2024

Hover & click on the images for description

Description

Description:
Returns unit's knowledge about target.
Groups:
Object Detection

Syntax

Syntax:
unit targetKnowledge target
Parameters:
unit: Object
target: Object
Return Value:
Array in format [knownByGroup, knownByUnit, lastSeen, lastThreat, side, errorMargin, position]:
  • knownByGroup: Boolean - target known by group
  • knownByUnit: Boolean - target known by the unit
  • lastSeen: Number - last time the target was seen by the unit
  • lastThreat: Number - last time the target endangered the unit
  • side: Side - target side
  • errorMargin: Number - position error
  • position: Array - target position in format Position
  • Arma 3 logo black.png2.18: Boolean - target is ignored (ignoreTarget)

Examples

Example 1:
private _allInfo = _soldierOne targetKnowledge _jeepOne; _allInfo params ["_knownByGroup", "_knownByUnit", "_lastSeen", "_lastThreat", "_side", "_errorMargin", "_position"];
Example 2:
private _posError = (_soldierOne targetKnowledge _jeepOne) select 5;

Additional Information

See also:
knowsAbout targets targetsQuery nearTargets targetsAggregate reveal forgetTarget setTargetAge getHideFrom ignoreTarget

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