targetKnowledge: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - "|= Comments" to "|Comments=")
m (Text replacement - "<sqf>([^↵][^\/]*↵[^\/]*)<\/sqf>" to "<sqf> $1 </sqf>")
 
(36 intermediate revisions by 4 users not shown)
Line 1: Line 1:
{{Command|Comments=
{{RV|type=command
____________________________________________________________________________________________


| arma3 |Game name=
|game1= arma3
|version1= 1.50


|1.50|Game version=
|gr1= Object Detection


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


| Returns unit's knowledge about target. The returned array includes information whether the target is
|s1= unit [[targetKnowledge]] 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
|DESCRIPTION=
____________________________________________________________________________________________


| unit '''targetKnowledge''' target |SYNTAX=
|p1= unit: [[Object]]


|p1= unit: [[Object]] |PARAMETER1=
|p2= target: [[Object]]


|p2= target: [[Object]] |PARAMETER2=
|r1= [[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]]
* {{GVI|arma3|2.18}}: [[Boolean]] - target is ignored ([[ignoreTarget]])


| [[Array]] (7 elements) |RETURNVALUE=
|x1= <sqf>
private _allInfo = _soldierOne targetKnowledge _jeepOne;
_allInfo params ["_knownByGroup", "_knownByUnit", "_lastSeen", "_lastThreat", "_side", "_errorMargin", "_position"];
</sqf>


|mp= ... |=
|x2= <sqf>private _posError = (_soldierOne targetKnowledge _jeepOne) select 5;</sqf>
____________________________________________________________________________________________
 
|x1= <code>_allInfo = _soldierOne [[targetKnowledge]] _jeepOne;</code> |EXAMPLE1=
|x2= <code>_posError = (_soldierOne [[targetKnowledge]] _jeepOne) [[select]] 5;</code> |EXAMPLE2=
____________________________________________________________________________________________
 
| [[knowsAbout]], [[targetsQuery]], [[targetsAggregate]], [[nearTargets]], [[reveal]], [[getHideFrom]] |SEEALSO=


|seealso= [[knowsAbout]] [[targets]] [[targetsQuery]] [[nearTargets]] [[targetsAggregate]] [[reveal]] [[forgetTarget]] [[setTargetAge]] [[getHideFrom]] [[ignoreTarget]]
}}
}}
<h3 style="display:none">Notes</h3>
<dl class="command_description">
<h3 style="display:none">Bottom Section</h3>
[[Category:Scripting Commands|KNOWSABOUT]]
[[Category:Command_Group:_Object_Information|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting Commands Arma 3|{{uc:{{PAGENAME}}}}]]

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