targetKnowledge: Difference between revisions
Jump to navigation
Jump to search
Lou Montana (talk | contribs) m (Text replacement - "\|s([0-9])\= ([^' ]+)'''([^' ]+)'''([^ ]*) " to "|s$1= $2$3$4 ") |
Lou Montana (talk | contribs) m (Some wiki formatting) |
||
Line 14: | Line 14: | ||
|p2= target: [[Object]] | |p2= target: [[Object]] | ||
|r1= [[Array]] | |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]] | ||
|x1= <code>_allInfo = _soldierOne [[targetKnowledge]] _jeepOne;</code> | |x1= <code>[[private]] _allInfo = _soldierOne [[targetKnowledge]] _jeepOne; | ||
_allInfo [[params]] ["_knownByGroup", "_knownByUnit", "_lastSeen", "_lastThreat", "_side", "_errorMargin", "_position"];</code> | |||
|x2= <code>_posError = (_soldierOne [[targetKnowledge]] _jeepOne) [[select]] 5;</code> | |x2= <code>[[private]] _posError = (_soldierOne [[targetKnowledge]] _jeepOne) [[select]] 5;</code> | ||
|seealso= [[knowsAbout]], [[targetsQuery]], [[targetsAggregate]], [[nearTargets]], [[reveal]], [[getHideFrom]] | |seealso= [[knowsAbout]], [[targetsQuery]], [[targetsAggregate]], [[nearTargets]], [[reveal]], [[getHideFrom]] | ||
}} | }} |
Revision as of 12:59, 22 November 2021
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
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