listVehicleSensors: Difference between revisions

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


|gr1= Sensors |GROUP1=
|gr1= Sensors
____________________________________________________________________________________________


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


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


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


| [[Array]] of [[String]]s |RETURNVALUE=
|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> |EXAMPLE1=
____________________________________________________________________________________________


| [[listRemoteTargets]], [[enableVehicleSensor]], [[isVehicleRadarOn]], [[isVehicleSensorEnabled]] |SEEALSO=
|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