DCS func getDetectedTargets

From DCS World Wiki - Hoggitworld.com

Scripting Root

Envrioment: Mission Scripting
Function: getDetectedTargets Added with: 1.2.6
Member Of: Controller
Syntax: table Controller.getDetectedTargets(Class self , enum detectionType1, enum detectionType2, enum detectionType3 ...)
Description: Returns a table of detected targets that are detected by the different detection methods. If not detection method is specified, then all forms of detection will be used.


Return Value: table
Return Example: Returns a table of detected targets
DetectedTarget = {
  object = Object, --the target
  visible = boolean, --the target is visible
  type = boolean, --the target type is known
  distance = boolean --distance to the target is known

Applies only to a Unit Controller. Cannot be used at the group level.

Examples:
Related Functions: Controller: setTask, resetTask, pushTask, popTask, hasTask, setCommand, setOption, setOnOff, setAltitude, setSpeed, knowTarget, isTargetDetected, getDetectedTargets
Notes: Detection Types
Conroller.Detection = {  
  VISUAL = 1,
  OPTIC  = 2,
  RADAR  = 4,
  IRST   = 8,
  RWR    = 16,
  DLINK  = 32
}