Page MenuHomeFeedback Tracker

[Feature Request] New Scripting Command: getSensorTargets / getSensorThreats
Feedback, NormalPublic

Description

Description: Returns an array of objects and object types that are shown by an object's 'sensors'- https://community.bistudio.com/wikidata/images/5/59/Arma_3_Sensors_Sensor_Display_symbology.png

Syntax 1: getSensorTargets Vehicle;
Syntax 2: getSensorThreats Vehicle;

Returns: Array of Arrays
getSensorTargets: [Object, Type, Side, Sensor]
Object: Object
Type: String - Type of target, values are "footmobile", "ground", "air", "lasertarget", "IRtarget", and "radartarget"
Side: String - Displayed hostility, values are "friendly", "hostile", and "unknown"
Sensor: String - The name of the sensor used to detect the target, values are "passiveradar", "antiradiation", "activeradar", "IR", "visual", "man", "laser", "NV", and "datalink".

getSensorThreats: [Object, Type, Sensor]
Object; Object- the object that has locked or marked, or the ammo object, in case of 'missile';
Type: String - Type of threat, values are "marked", "locked", "missile", "threatlocked", "threatmissile"
Sensor: Number - The number of the sensor type used to detect the threat, values are as here: https://community.bistudio.com/wiki/Arma_3_Targeting_config_reference#weaponLockSystem

Reasoning: Establishes ability for scripts to retrieve information from what threats are shown on the sensor display, and either extract or sort these objects/values by type, sensor, etc.

Details

Severity
None
Resolution
Open
Reproducibility
N/A
Operating System
Windows 7
Category
Scripting

Event Timeline

LLukeL created this task.Jun 7 2020, 11:33 PM
LLukeL changed Category from General to Scripting.
dedmen claimed this task.Jun 2 2021, 2:38 PM
dedmen changed the task status from New to Assigned.
dedmen set Ref Ticket to AIII-54259.
dedmen added a comment.Jun 2 2021, 3:30 PM
that are shown by an object's 'sensors'

What an object/AI knows about doesn't always equal what the sensor currrently sees.
Also sensor view range can be adjusted by player, I guess this script command would just either ignore sensor range, or use max range

dedmen added a comment.Jun 2 2021, 3:55 PM

Sensor: String - The name of the sensor used to detect the target, values are "passiveradar", "antiradiation", "activeradar", "IR", "visual", "man", "laser", "NV", and "datalink".

A target can be detected by multiple sensors at once. so I'll make that an array

dedmen added a comment.Jun 2 2021, 4:32 PM

[[O Alpha 1-1:1,"air","unknown",["activeradar","datalink"]],[R Alpha 1-2:1,"air","unknown",["activeradar","datalink"]]]

[[28f09426b00# 72: lasertgt.p3d,"lasertarget","enemy",["laser"]],[2901fdb4080# 22: apc_tracked_01_aa_f.p3d,"ground","unknown",["activeradar"]]]

[[2901fdb4080# 22: apc_tracked_01_aa_f.p3d,"ground","unknown",["activeradar"]]]

[[2901fdb4080# 22: apc_tracked_01_aa_f.p3d,"ground","unknown",[]],[R Alpha 1-2:1,"air","unknown",["ir","visual"]]]

[[2901fdb4080# 22: apc_tracked_01_aa_f.p3d,"ground","unknown",[]],[R Alpha 1-2:1,"air","unknown",[]]]

I guess no sensor at all means its not currently detected, but still in the vehicles sensor memory?

[[R Alpha 1-2:1,"air","unknown",["ir","activeradar","visual"]]]

[[28f25eb6b00# 76: lasertgt.p3d,"lasertarget","enemy",["laser"]],[R Alpha 1-2:1,"air","unknown",[]]]

[[28f25eb6b00# 76: lasertgt.p3d,"lasertarget","enemy",["laser"]],[2901fdb4080# 22: apc_tracked_01_aa_f.p3d,"ground","unknown",["activeradar","visual"]],[R Alpha 1-2:1,"air","unknown",["ir","activeradar","visual"]]]

dedmen added a comment.Jun 2 2021, 4:46 PM

Type: String - Type of threat, values are "marked", "locked", "missile", "threatlocked", "threatmissile"

only missile, threatmissile, marked, locked

dedmen added a comment.EditedJun 2 2021, 6:23 PM

[[164230: titan_missile_atl_fly.p3d,"missile",16],[164230: titan_missile_atl_fly.p3d,"threatmissile",16]]
ono, incoming missile! get down!

[[O Alpha 1-3:1,"air","unknown",["ir","activeradar","visual"]],[17750112040# 163957: apc_tracked_01_aa_f.p3d,"ground","unknown",[]]]

dedmen changed the task status from Assigned to Feedback.Jun 2 2021, 6:25 PM

next dev-branch update should have it. Please test the shit out of it.

dedmen added a comment.EditedJun 2 2021, 6:54 PM

getSensorTargets

types:
unknown
footmobile
air
ground
lasertarget
irtarget
radartarget

sides:
friendly
enemy
destroyed
unknown

sensors:
ir
nv
laser
activeradar
passiveradar
man
visual
datalink

getSensorThreats
types :
missile
marked
locked

LLukeL added a comment.Jun 2 2021, 9:09 PM

Just for clarity of the request and what each value means, whether or not 'threatlocked' is added is up to you.

dedmen added a comment.EditedJun 3 2021, 6:58 PM

Ah, the cones you can construct by yourself. As you have the reference to the missile and know where its coming from.

I should remove threatmissile then, I already noticed missile and threatmissile are always both there

LLukeL added a comment.EditedJun 3 2021, 8:57 PM

What an object/AI knows about doesn't always equal what the sensor currrently sees.
Also sensor view range can be adjusted by player, I guess this script command would just either ignore sensor range, or use max range

The intent of asking about this command is less about the sensor panel display itself (though that's the only reference I have to what goes on in the engine code) and more of what a particular unit is picking up on its sensors at any given time.
So, for example if I'm in a ZSU-39 Tigris with the radar on, and an A-164 Wipeout flies by, being able to use that command on the Wipeout to see that their sensor components picks up my active radar, etc.

getSensorTargets

types:
{...}

getSensorThreats
types :
{...}

Also, from the construction here, does this imply that this is a no-argument function like cursorTarget, or would it handle some object with sensors as a singular argument, e.g. getSensorTargets (vehicle player)?

they are both unary commands that take an object as parameter.

I adjusted getSensorThreats and removed the threatmissile, you only have missile.
I tested all the others in multiplayer and they should correspond to whats shown on the display.
Not 100% tested if all the sensors are listed correctly.
but IR,NV,passive/activeradar, laser, visual seem to work correctly

TCVM added a subscriber: TCVM.Jun 5 2021, 1:31 AM