nearTargets: Difference between revisions
Jump to navigation
Jump to search
(Updated SEE ALSO) |
Lou Montana (talk | contribs) m (Text replacement - ">Posted on January ([0-9]{2})[ a-zA-Z]*, ([0-9]{4})" to ">Posted on $2-01-$1") |
||
Line 55: | Line 55: | ||
<dd class="note">A subjective cost greater than 0 does not necessarily mean the target is an enemy unit. <b>Any</b> unit, that have yet to be identified by the unit, have a small positive cost in the range 0 to 1. | <dd class="note">A subjective cost greater than 0 does not necessarily mean the target is an enemy unit. <b>Any</b> unit, that have yet to be identified by the unit, have a small positive cost in the range 0 to 1. | ||
<dt><dt> | <dt><dt> | ||
<dd class="notedate">Posted on | <dd class="notedate">Posted on 2012-01-15</dd> | ||
<dt class="note">[[User:kju|kju]]</dt> | <dt class="note">[[User:kju|kju]]</dt> | ||
<dd class="note">The quality/detail level of the info depends on the [[knowsAbout]] value of the sourceUnit about the targetUnit: | <dd class="note">The quality/detail level of the info depends on the [[knowsAbout]] value of the sourceUnit about the targetUnit: | ||
Line 88: | Line 88: | ||
** 0.25 class M1A1: Tank | ** 0.25 class M1A1: Tank | ||
<dt><dt> | <dt><dt> | ||
<dd class="notedate">Posted on | <dd class="notedate">Posted on 2012-01-17</dd> | ||
<dt class="note">[[User:kju|kju]]</dt> | <dt class="note">[[User:kju|kju]]</dt> | ||
<dd class="note"> | <dd class="note"> | ||
Line 95: | Line 95: | ||
* A target will be removed from the array after about 360 seconds without contact. | * A target will be removed from the array after about 360 seconds without contact. | ||
<dt><dt> | <dt><dt> | ||
<dd class="notedate">Posted on | <dd class="notedate">Posted on 2012-01-21</dd> | ||
<dt class="note">[[User:kju|kju]]</dt> | <dt class="note">[[User:kju|kju]]</dt> | ||
<dd class="note">Position accuracy seems to be a radius in meters from the perceived position. | <dd class="note">Position accuracy seems to be a radius in meters from the perceived position. | ||
</dl> | </dl> |
Revision as of 23:02, 13 May 2023
Description
- Description:
- Returns a list of targets within the defined range. "Targets" are not restricted to enemy units.
- Groups:
- Object Detection
Syntax
- Syntax:
- unit nearTargets range
- Parameters:
- unit: Object
- range: Number
- Return Value:
- Array - Array of arrays in format:
- 0: _position (perceived, includes judgment and memory errors)
- 1: _type (perceived, gives only what was recognized)
- 2: _side (perceived side)
- 3: _subjectiveCost (positive for enemies, more positive for more important or more dangerous enemies)
- 4: _object (object type, can be used to get more information if needed)
- 5: _positionAccuracy (assumed accuracy of the perceived position)
Examples
- Example 1:
- player nearTargets 100; // can return e.g /* [ [[2555.33,2535.33,1.32708],"SoldierEB",EAST,214222,EAST 1-1-A:1], [[2550.39,2482.5,1.32696],"SoldierWB",WEST,0,WEST 1-1-A:2] ] */
Additional Information
- See also:
- targets targetsQuery targetsAggregate targetKnowledge knowsAbout reveal forgetTarget setTargetAge getHideFrom findNearestEnemy nearestBuilding nearestObject nearestObjects nearObjects nearestLocation nearEntities nearSupplies nearestLocationWithDubbing nearObjectsReady nearRoads nearestMines
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
- Posted on Febuary 17, 2011
- Curry
- A subjective cost greater than 0 does not necessarily mean the target is an enemy unit. Any unit, that have yet to be identified by the unit, have a small positive cost in the range 0 to 1.
- Posted on 2012-01-15
- kju
- The quality/detail level of the info depends on the knowsAbout value of the sourceUnit about the targetUnit:
- For infantry:
- ] 0 , 1.5 [ - side unknown, some position offset, identified as SoldierWB
- [ 1.5, 1.6 [ - side identified, subjective cost set
- [ 1.6, 2 [ - type identified better (USMC_Soldier_Base)
- [ 2 , 3.6 [ - type identified precisely (USMC_Soldier)
- [ 3.6, 4 ] - position identified precisely
- 0 class CAManBase: Man
- 1.6 class SoldierWB: CAManBase
- 2 class USMC_Soldier_Base: SoldierWB
- 3.9 class USMC_Soldier: USMC_Soldier_Base
- For tanks:
- ] 0 , 0.03 [ - side unknown, some position offset, identified as LandVehicle
- [ 0.03, 0.13 [ - type identified better (Tank)
- [ 0.13, 0.3 [ - type identified better (M1A1)
- [ 0.3 , 1.5 [ - side identified, subjective cost set
- [ 1.5 , 3.6 [ - side identified precisely (CIV), subjective cost adjusted
- [ 3.6 , 4 ] - position identified precisely
- 0 class All
- class AllVehicles: All
- 0.0005 class Land: AllVehicles
- 0.02 class LandVehicle: Land
- 0.12 class Tank: LandVehicle
- 0.25 class M1A1: Tank
- For infantry:
- Posted on 2012-01-17
- kju
-
- When an unit dies, it is nearTargets array gets emptied after some seconds.
- When an unit dies, its reference will get removed from other units nearTargets' arrays immediately.
- A target will be removed from the array after about 360 seconds without contact.
- Posted on 2012-01-21
- kju
- Position accuracy seems to be a radius in meters from the perceived position.
Categories:
- Scripting Commands
- Introduced with Armed Assault version 1.07
- ArmA: Armed Assault: New Scripting Commands
- ArmA: Armed Assault: Scripting Commands
- Arma 2: Scripting Commands
- Arma 2: Operation Arrowhead: Scripting Commands
- Take On Helicopters: Scripting Commands
- Arma 3: Scripting Commands
- Command Group: Object Detection