nearTargets: Difference between revisions

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


|arma1
|game1= arma1


|1.07
|version1= 1.07


|gr1= Object Detection
|game2= arma2


| Returns a list of targets within the defined range. "Targets" are not restricted to enemy units.
|version2= 1.00


| unit '''nearTargets''' range
|game3= arma2oa


|p1= unit: [[Object]]
|version3= 1.51
|p2= range: [[Number]]


| [[Array]] - nested; consisting of:
|game4= tkoh
*0: Position (perceived, includes judgment and memory errors),
*1: Type (perceived, gives only what was recognized),
*2: Side (perceived side),
*3: Subjective Cost (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: (since build 5209:) position accuracy (assumed accuracy of the perceived position)


'''for each recognized target'''
|version4= 1.00


 
|game5= arma3
|x1= <code>[[player]] [[nearTargets]] 100;</code>could return something like this: <br>
<nowiki>[[[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]]</nowiki>


|seealso= [[reveal]], [[knowsAbout]], [[findNearestEnemy]], [[nearestBuilding]], [[nearestObject]], [[nearestObjects]], [[nearObjects]], [[nearestLocation]], [[nearEntities]], [[nearSupplies]], [[nearestLocationWithDubbing]], [[nearObjectsReady]], [[nearRoads]], [[forgetTarget]]
|version5= 0.50
}}


<dl class="command_description">
|gr1= Object Detection
<!-- Note Section BEGIN -->


<dd class="notedate">Posted on Febuary 17, 2011</dd>
|descr= Returns a list of targets within the defined range. "Targets" are not restricted to enemy units.
<dt class="note">[[User:Curry|Curry]]</dt>
<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="notedate">Posted on January 15, 2012</dd>
|s1= unit '''nearTargets''' range
<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:


For infantry:
|p1= unit: [[Object]]
] 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


The values seems closely linked to the accuracy value of the given targetUnit class and its parents up in the config tree:
|p2= range: [[Number]]
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:
|r1= [[Array]] - Array of arrays in format:
] 0   , 0.03 [ - side unknown, some position offset, identified as LandVehicle
*0: _position (perceived, includes judgment and memory errors)
[ 0.03, 0.13 [ - type identified better (Tank)
*1: _type (perceived, gives only what was recognized)
[ 0.13, 0.3  [ - type identified better (M1A1)
*2: _side (perceived side)
[ 0.3 , 1.5  [ - side identified, subjective cost set
*3: _subjectiveCost (positive for enemies, more positive for more important or more dangerous
[ 1.5 , 3.6  [ - side identified precisely (CIV), subjective cost adjusted
enemies)
[ 3.6 , 4    ] - position identified precisely
*4: _object (object type, can be used to get more information if needed)
*5: _positionAccuracy (assumed accuracy of the perceived position)
 
|x1= <code>[[player]] [[nearTargets]] 100;{{cc|Could return something like this: [[[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]]}}</code>


The values seems closely linked to the accuracy value of the given targetUnit class and its parents up in the config tree:
|seealso= [[reveal]], [[knowsAbout]], [[findNearestEnemy]], [[nearestBuilding]], [[nearestObject]], [[nearestObjects]], [[nearObjects]], [[nearestLocation]], [[nearEntities]], [[nearSupplies]], [[nearestLocationWithDubbing]], [[nearObjectsReady]], [[nearRoads]], [[forgetTarget]]
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
 
<dd class="notedate">Posted on January 17, 2012</dd>
<dt class="note">[[User:kju|kju]]</dt>
<dd class="note">When an unit dies, it is nearTargets array gets emptied after some seconds.
<dd class="note">When an unit dies, its reference will get removed from other units nearTargets' arrays immediately.
<dd class="note">A target will be removed from the array after about 360 seconds without contact.
 
<dd class="notedate">Posted on January 21, 2012</dd>
<dt class="note">[[User:kju|kju]]</dt>
<dd class="note">Position accuracy seems to be a radius in meters from the perceived position.
 
<!-- Note Section END -->
</dl>
 
 
{{GameCategory|arma1|Scripting Commands}}
{{GameCategory|arma2|Scripting Commands}}
{{GameCategory|arma3|Scripting Commands}}
{{GameCategory|tkoh|Scripting Commands}}

Revision as of 15:51, 31 March 2021

{{RV|type=command

|game1= arma1

|version1= 1.07

|game2= arma2

|version2= 1.00

|game3= arma2oa

|version3= 1.51

|game4= tkoh

|version4= 1.00

|game5= arma3

|version5= 0.50

|gr1= Object Detection

|descr= Returns a list of targets within the defined range. "Targets" are not restricted to enemy units.

|s1= unit nearTargets range

|p1= unit: Object

|p2= range: Number

|r1= 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)

|x1= player nearTargets 100;{{cc|Could return something like this: [[[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]]}}

|seealso= reveal, knowsAbout, findNearestEnemy, nearestBuilding, nearestObject, nearestObjects, nearObjects, nearestLocation, nearEntities, nearSupplies, nearestLocationWithDubbing, nearObjectsReady, nearRoads, forgetTarget }}