targetKnowledge: Difference between revisions

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


| arma3
|game1= arma3


|1.50
|version1= 1.50


|gr1= Object Manipulation
|gr1= Object Manipulation


| Returns unit's knowledge about target. The returned array includes information whether the target is
|descr= Returns unit's knowledge about target.
# known by group
# known by the unit
# last time the target was seen by the unit
# last time the target endangered the unit
# target side
# position error
# target position


| unit '''targetKnowledge''' target
|s1 = unit '''targetKnowledge''' target


|p1= unit: [[Object]]
|p1= unit: [[Object]]
Line 22: Line 15:
|p2= target: [[Object]]
|p2= target: [[Object]]


| [[Array]] (7 elements)
|r1= [[Array]] - Array in format
* 0: [[Boolean]] - Target known by group
* 1: [[Boolean]] - Target known by the unit
* 2: [[Number]] - Last time the target was seen by the unit
* 3: [[Number]] - Last time the target endangered the unit
* 4: [[Side]] - Target side
* 5: [[Number]] - Position error
* 6: [[Array]] - Target position in format [[Position]]
   
   
|x1= <code>_allInfo = _soldierOne [[targetKnowledge]] _jeepOne;</code>
|x1= <code>_allInfo = _soldierOne [[targetKnowledge]] _jeepOne;</code>
|x2= <code>_posError = (_soldierOne [[targetKnowledge]] _jeepOne) [[select]] 5;</code>
|x2= <code>_posError = (_soldierOne [[targetKnowledge]] _jeepOne) [[select]] 5;</code>


|seealso= [[knowsAbout]], [[targetsQuery]], [[targetsAggregate]], [[nearTargets]], [[reveal]], [[getHideFrom]]
|seealso= [[knowsAbout]], [[targetsQuery]], [[targetsAggregate]], [[nearTargets]], [[reveal]], [[getHideFrom]]
}}
}}
<dl class="command_description">
{{GameCategory|arma3|Scripting Commands}}

Revision as of 16:28, 11 May 2021

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 - Array in format
  • 0: Boolean - Target known by group
  • 1: Boolean - Target known by the unit
  • 2: Number - Last time the target was seen by the unit
  • 3: Number - Last time the target endangered the unit
  • 4: Side - Target side
  • 5: Number - Position error
  • 6: Array - Target position in format Position

Examples

Example 1:
_allInfo = _soldierOne targetKnowledge _jeepOne;
Example 2:
_posError = (_soldierOne targetKnowledge _jeepOne) select 5;

Additional Information

See also:
knowsAbouttargetsQuerytargetsAggregatenearTargetsrevealgetHideFrom

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