Difference between revisions of "getSensorTargets"

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Fix return value type)
m (Fix parameters, add example)
Line 16: Line 16:
 
|p1= vehicle: [[Object]] - the sensors-equipped vehicle
 
|p1= vehicle: [[Object]] - the sensors-equipped vehicle
  
|r1= [[Array]] of [[Array]]s - format [target, type, relationship, sensor]:
+
|r1= [[Array]] of [[Array]]s - format [<nowiki/>[target, type, relationship, sensor], ...]:
 
* target: [[Object]]
 
* target: [[Object]]
 
* type: [[String]], can be one of:
 
* type: [[String]], can be one of:
Line 31: Line 31:
 
** "destroyed"
 
** "destroyed"
 
** "unknown"
 
** "unknown"
* sensor: [[String]], can be one of:
+
* sensor: [[Array]] of [[String]]s, among the following values:
 
** "ir"
 
** "ir"
 
** "nv"
 
** "nv"
Line 41: Line 41:
 
** "datalink"
 
** "datalink"
  
|x1= <code>[[private]] _radarTargets = [[getSensorTargets]] [[vehicle]] [[player]];</code>
+
|x1= <code>[[private]] _radarTargets = [[getSensorTargets]] [[vehicle]] [[player]];
 +
{{codecomment|/*
 +
returns e.g
 +
[
 +
[O Alpha 1-3:1, "air", "unknown", ["ir", "activeradar", "visual"]],
 +
[17750112040# 163957: apc_tracked_01_aa_f.p3d, "ground", "unknown", ["datalink"]]
 +
]
 +
<nowiki/>*/}}
 +
</code>
  
 
|seealso= [[getSensorThreats]] [[listVehicleSensors]] [[listRemoteTargets]]
 
|seealso= [[getSensorThreats]] [[listVehicleSensors]] [[listRemoteTargets]]
 
}}
 
}}

Revision as of 10:00, 7 June 2021

Hover & click on the images for description
Only available in Development branch(es) until its release with Arma 3 patch v2.06.

Description

Description:
Returns vehicle sensors' potential targets.
Groups:
Sensors

Syntax

Syntax:
getSensorTargets vehicle
Parameters:
vehicle: Object - the sensors-equipped vehicle
Return Value:
Array of Arrays - format [[target, type, relationship, sensor], ...]:
  • target: Object
  • type: String, can be one of:
    • "unknown"
    • "footmobile"
    • "air"
    • "ground"
    • "laserTarget"
    • "irTarget"
    • "radarTarget"
  • relationship: String, can be one of:
    • "friendly"
    • "enemy"
    • "destroyed"
    • "unknown"
  • sensor: Array of Strings, among the following values:
    • "ir"
    • "nv"
    • "laser"
    • "activeradar"
    • "passiveradar"
    • "man"
    • "visual"
    • "datalink"

Examples

Example 1:
private _radarTargets = getSensorTargets vehicle player; /* returns e.g [ [O Alpha 1-3:1, "air", "unknown", ["ir", "activeradar", "visual"]], [17750112040# 163957: apc_tracked_01_aa_f.p3d, "ground", "unknown", ["datalink"]] ] */

Additional Information

See also:
getSensorThreats listVehicleSensors listRemoteTargets

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