Difference between revisions of "DCS func getSensors"

From DCS World Wiki - Hoggitworld.com
m (1 revision imported)
 
 
Line 85: Line 85:
 
}}
 
}}
 
[[Category:Class Functions|getSensors]]
 
[[Category:Class Functions|getSensors]]
 +
[[Category:Game Patch 1.2.0|getSensors]]

Latest revision as of 00:06, 21 March 2022

Scripting Root

Envrioment: Mission Scripting
Function: getSensors Added with: 1.2.0
Member Of: Unit
Syntax: table Unit.getSensors(Class Self )
Description: Returns a table defining each of the sensors available to the specified unit.


Return Value: table
Return Example: A SA-15 Tor returned this table for sensors
 {
   [1] = 
   {
       [1] = 
       {
           ["detectionDistanceAir"] = 
           {
               ["upperHemisphere"] = 
               {
                   ["tailOn"] = 22795.072265625,
                   ["headOn"] = 45590.14453125,
               }, -- end of ["upperHemisphere"]
               ["lowerHemisphere"] = 
               {
                   ["tailOn"] = 22795.072265625,
                   ["headOn"] = 45590.14453125,
               }, -- end of ["lowerHemisphere"]
           }, -- end of ["detectionDistanceAir"]
           ["type"] = 1,
           ["typeName"] = "N-019M",
       }, -- end of [1]
   }, -- end of [1]
   [2] = 
   {
       [1] = 
       {
           ["type"] = 2,
           ["detectionDistanceMaximal"] = 12000,
           ["detectionDistanceIdle"] = 6000,
           ["typeName"] = "KOLS",
           ["detectionDistanceAfterburner"] = 20000,
       }, -- end of [1]
   }, -- end of [2]
   [3] = 
   {
       [1] = 
       {
           ["typeName"] = "Abstract RWR",
           ["type"] = 3,
       }, -- end of [1]
   }, -- end of [3]
 } -- end of Tor Sensors
Examples:
Related Functions: Unit Functions: isActive, getPlayerName, getID, getNumber, getCategoryEx, getObjectID, getController, getGroup, getCallsign, getLife, getLife0, getFuel, getAmmo, getSensors, hasSensors, getRadar, getDrawArgumentValue, getNearestCargos, enableEmission, getDescentCapacity

Object Functions: isExist, destroy, getCategory, getTypeName, getDesc, hasAttribute, getName, getPoint, getPosition, getVelocity, inAir

Coalition Object Functions: getCoalition, getCountry

Notes: