getSensorThreats: Difference between revisions

From Bohemia Interactive Community
m (Some wiki formatting)
(Fixed example & description - thanks PiG13BR (Discord))
 
Line 20: Line 20:
** "marked"
** "marked"
** "locked"
** "locked"
* sensor: [[String]] - can be one of:
* sensors: [[Array]] of [[String]]s - values can be:
** "ir"
** "ir"
** "laser"
** "laser"
Line 32: Line 32:
returns e.g
returns e.g
[
[
[164230: titan_missile_atl_fly.p3d, "missile", "visual"],
[164230: titan_missile_atl_fly.p3d, "missile", ["visual"]],
[164233: titan_missile_atl_fly.p3d, "threatmissile", "radar"]
[164233: titan_missile_atl_fly.p3d, "threatmissile", ["radar"]]
]
]
*/
*/

Latest revision as of 17:41, 12 June 2025

Hover & click on the images for description

Description

Description:
Returns vehicle sensors' threats.
Groups:
Sensors

Syntax

Syntax:
getSensorThreats vehicle
Parameters:
vehicle: Object - the sensors-equipped vehicle
Return Value:
Array of Arrays - format [[object, type, sensor], ...]:
  • object: Object
  • type: String - can be one of:
    • "missile"
    • "marked"
    • "locked"
  • sensors: Array of Strings - values can be:
    • "ir"
    • "laser"
    • "missile"
    • "radar" (not "activeradar"/"passiveradar")
    • "visual"

Examples

Example 1:
private _dangers = getSensorThreats vehicle player; /* returns e.g [ [164230: titan_missile_atl_fly.p3d, "missile", ["visual"]], [164233: titan_missile_atl_fly.p3d, "threatmissile", ["radar"]] ] */

Additional Information

See also:
getSensorTargets 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