listVehicleSensors: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - "{{Command " to "{{RV|type=command ")
m (Some wiki formatting)
 
(19 intermediate revisions by 3 users not shown)
Line 1: Line 1:
{{DISPLAYTITLE:listVehicleSensors}}
{{RV|type=command
{{RV|type=command
| arma3 |= Game name
|game1= arma3
| 1.72
|version1= 1.72


|gr1= Sensors
|gr1= Sensors


| Returns an array of the sensors in the given vehicle's config (configfile >> CfgVehicles >> vehicle >> Components >> SensorsManagerComponent >> Components).
|descr= Returns an array of the sensors in the given vehicle's config (configFile >> "CfgVehicles" >> ''vehicle'' >> "Components" >> "SensorsManagerComponent" >> "Components").


| '''listVehicleSensors''' vehicle
|s1= [[listVehicleSensors]] vehicle


|p1= vehicle: [[Object]]
|p1= vehicle: [[Object]]


| [[Array]] of [[String]]s
|r1= [[Array]] of [[Array]]s of [[String]]s format [className, componentType] (use ''className'' for [[enableVehicleSensor]] / [[isVehicleSensorEnabled]])
 
|x1= <code>_sensors = [[listVehicleSensors]] ([[vehicle]] [[player]]);
[[hint]] [[str]] _sensors;</code>


| [[listRemoteTargets]], [[enableVehicleSensor]], [[isVehicleRadarOn]], [[isVehicleSensorEnabled]]
|x1= <sqf>
private _sensors = listVehicleSensors _v44blackfish;
hint str _sensors;
/*
e.g for a V44 Blackfish:
[
["IRSensorComponent", "IRSensorComponent"],
["VisualSensorComponent", "VisualSensorComponent"],
["ActiveRadarSensorComponent", "ActiveRadarSensorComponent"],
["PassiveRadarSensorComponent", "PassiveRadarSensorComponent"],
["LaserSensorComponent", "LaserSensorComponent"],
["NVSensorComponent", "NVSensorComponent"]
]
*/
</sqf>
 
|seealso= [[listRemoteTargets]] [[enableVehicleSensor]] [[isVehicleRadarOn]] [[isVehicleSensorEnabled]]
}}
}}
<dl class="command_description">
</dl>
{{GameCategory|arma3|New Scripting Commands}}
{{GameCategory|arma3|Scripting Commands}}
[[Category:Scripting Commands|{{uc:{{PAGENAME}}}}]]

Latest revision as of 18:31, 24 March 2024

Hover & click on the images for description

Description

Description:
Returns an array of the sensors in the given vehicle's config (configFile >> "CfgVehicles" >> vehicle >> "Components" >> "SensorsManagerComponent" >> "Components").
Groups:
Sensors

Syntax

Syntax:
listVehicleSensors vehicle
Parameters:
vehicle: Object
Return Value:
Array of Arrays of Strings format [className, componentType] (use className for enableVehicleSensor / isVehicleSensorEnabled)

Examples

Example 1:
private _sensors = listVehicleSensors _v44blackfish; hint str _sensors; /* e.g for a V44 Blackfish: [ ["IRSensorComponent", "IRSensorComponent"], ["VisualSensorComponent", "VisualSensorComponent"], ["ActiveRadarSensorComponent", "ActiveRadarSensorComponent"], ["PassiveRadarSensorComponent", "PassiveRadarSensorComponent"], ["LaserSensorComponent", "LaserSensorComponent"], ["NVSensorComponent", "NVSensorComponent"] ] */

Additional Information

See also:
listRemoteTargets enableVehicleSensor isVehicleRadarOn isVehicleSensorEnabled

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