enableVehicleSensor: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - "|= Comments" to "|Comments=")
m (Text replacement - "(\|[pr][0-9]+ *= *[^- ]*) *- *T([a-z ])" to "$1 - t$2")
 
(36 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{Command|Comments=
{{RV|type=command
____________________________________________________________________________________________


| arma3 |= Game name
|game1= arma3
|version1= 1.72


|1.72|= Game version
|arg= global
____________________________________________________________________________________________


| Enable/disable given sensor |DESCRIPTION=
|eff= local
____________________________________________________________________________________________


| vehicle '''enableVehicleSensor''' [componentName, state] |SYNTAX=
|gr1= Sensors


|p1 = vehicle: [[Object]]
|descr= Enable/disable given sensor


|p2 = componentName : [[String]] - The component's name (can either be it's "real name" or it's className)
|s1= vehicle [[enableVehicleSensor]] [componentName, enabled]


|p3 = state: [[Bool]] - component state [on/off]
|p1= vehicle: [[Object]]


| [[Nothing]] |RETURNVALUE= |RETURNVALUE=
|p2= componentName : [[String]] - the component's name (can either be its "real name" or its className)
______________________________________________________________________________________
 
|x1= <code> [[vehicle]] [[player]] [[enableVehicleSensor]]  ["PassiveRadarSensorComponent",false]; // disables passive radar </code> |EXAMPLE1=
____________________________________________________________________________________________


| [[listVehicleSensors]], [[isVehicleSensorEnabled]] |SEEALSO=
|p3= enabled: [[Boolean]] - component status


}}
|r1= [[Nothing]]


<h3 style="display:none">Notes</h3>
|x1= <sqf>vehicle player enableVehicleSensor ["PassiveRadarSensorComponent", false]; // disables passive radar</sqf>
<dl class="command_description">
<!-- Note Section BEGIN -->
<!-- Note Section END -->
</dl>


<h3 style="display:none">Bottom Section</h3>
|seealso= [[listVehicleSensors]] [[isVehicleSensorEnabled]]
[[Category:Arma_3:_New_Scripting_Commands_List|{{uc:{{PAGENAME}}}}]]
}}
[[Category:Scripting Commands|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting Commands Arma 3|{{uc:{{PAGENAME}}}}]]

Latest revision as of 15:50, 8 November 2023

Hover & click on the images for description

Description

Description:
Enable/disable given sensor
Groups:
Sensors

Syntax

Syntax:
vehicle enableVehicleSensor [componentName, enabled]
Parameters:
vehicle: Object
componentName : String - the component's name (can either be its "real name" or its className)
enabled: Boolean - component status
Return Value:
Nothing

Examples

Example 1:
vehicle player enableVehicleSensor ["PassiveRadarSensorComponent", false]; // disables passive radar

Additional Information

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