enableVehicleSensor: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - "\[\[Category:[ _]?Scripting[ _]Commands[ _]Arma[ _]3(\|.*)]]" to "{{GameCategory|arma3|Scripting Commands}}")
m (Text replacement - "(\|[pr][0-9]+ *= *[^- ]*) *- *T([a-z ])" to "$1 - t$2")
 
(27 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


|gr1= Sensors |GROUP1=
|eff= local
____________________________________________________________________________________________


| Enable/disable given sensor |DESCRIPTION=
|gr1= Sensors
____________________________________________________________________________________________


| vehicle '''enableVehicleSensor''' [componentName, state] |SYNTAX=
|descr= Enable/disable given sensor


|p1 = vehicle: [[Object]] |PARAMETER1=
|s1= vehicle [[enableVehicleSensor]] [componentName, enabled]


|p2 = componentName : [[String]] - The component's name (can either be it is "real name" or it is className) |PARAMETER2=
|p1= vehicle: [[Object]]


|p3 = state: [[Boolean]] - component state [on/off] |PARAMETER3=
|p2= componentName : [[String]] - the component's name (can either be its "real name" or its className)


| [[Nothing]] |RETURNVALUE=
|p3= enabled: [[Boolean]] - component status
______________________________________________________________________________________
 
|x1= <code> [[vehicle]] [[player]] [[enableVehicleSensor]]   ["PassiveRadarSensorComponent",false]; // disables passive radar </code> |EXAMPLE1=
____________________________________________________________________________________________


| [[listVehicleSensors]], [[isVehicleSensorEnabled]] |SEEALSO=
|r1= [[Nothing]]


|x1= <sqf>vehicle player enableVehicleSensor ["PassiveRadarSensorComponent", false]; // disables passive radar</sqf>
|seealso= [[listVehicleSensors]] [[isVehicleSensorEnabled]]
}}
}}
<h3 style="display:none">Notes</h3>
<dl class="command_description">
<!-- Note Section BEGIN -->
<!-- Note Section END -->
</dl>
<h3 style="display:none">Bottom Section</h3>
{{GameCategory|arma3|New_Scripting_Commands_List}}
[[Category:Scripting Commands|{{uc:{{PAGENAME}}}}]]
{{GameCategory|arma3|Scripting Commands}}

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