targetKnowledge: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - "<code>([^ ]*)\[\[([a-zA-Z][a-zA-Z0-9_]+)\]\]([^ ]*) ([^ ]*)<\/code>" to "<code>$1$2$3 $4</code>")
m (Text replacement - "\|x([0-9])= *<code>([^<]*)<\/code>" to "|x$1= <sqf>$2</sqf>")
Line 23: Line 23:
* position: [[Array]] - target position in format [[Position]]
* position: [[Array]] - target position in format [[Position]]


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


|x2= <code>private _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]] [[targetsQuery]] [[targetsAggregate]] [[nearTargets]] [[reveal]] [[getHideFrom]]
}}
}}

Revision as of 10:25, 13 May 2022

Hover & click on the images for description

Description

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

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

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 targetsQuery targetsAggregate nearTargets reveal getHideFrom

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