listVehicleSensors: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
No edit summary
m (Some wiki formatting)
 
(34 intermediate revisions by 6 users not shown)
Line 1: Line 1:
{{DISPLAYTITLE:listVehicleSensors}}
{{RV|type=command
{{Command|= Comments
|game1= arma3
____________________________________________________________________________________________
|version1= 1.72
| arma3 |= Game name
| 1.71 |= Game Version
____________________________________________________________________________________________


| Returns an array of the sensors in the given vehicle's config (configfile >> CfgVehicles >> vehicle >> Components >> SensorsManagerComponent >> Components). |= Description
|gr1= Sensors
____________________________________________________________________________________________


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


|p1= vehicle: [[Object]] |= Parameter 1
|s1= [[listVehicleSensors]] vehicle


| [[Array]] of [[String]]s |= Return value
|p1= vehicle: [[Object]]
____________________________________________________________________________________________
 
|x1= <code>_sensors [[listVehicleSensors]] ([[vehicle]] [[player]]);
[[hint]] [[str]] _sensors;</code> |= Example 1
____________________________________________________________________________________________


| [[listRemoteTargets]], [[enableVehicleSensor]], [[isVehicleRadarOn]], [[isVehicleSensorEnabled]] |= See also
|r1= [[Array]] of [[Array]]s of [[String]]s format [className, componentType] (use ''className'' for [[enableVehicleSensor]] / [[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]]
}}
}}
<h3 style="display:none">Notes</h3>
<dl class="command_description">
</dl>
<h3 style="display:none">Bottom Section</h3>
[[Category:Arma_3:_New_Scripting_Commands_List|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting Commands Arma 3|{{uc:{{PAGENAME}}}}]]
[[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