enableVehicleSensor: Difference between revisions

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


| 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]] - name of component
|s1= vehicle [[enableVehicleSensor]] [componentName, enabled]


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


| [[Nothing]] |= Return value |= Return value
|p2= componentName : [[String]] - the component's name (can either be its "real name" or its className)


|p3= enabled: [[Boolean]] - component status


| s2=vehicleClass '''enableVehicleSensor''' [componentClassName, state]|= Syntax
|r1= [[Nothing]]


|p21 = vehicle: [[Object]]
|x1= <sqf>vehicle player enableVehicleSensor ["PassiveRadarSensorComponent", false]; // disables passive radar</sqf>
 
|p22 = componentName : [[String]] - class name of component
 
|p23 = state: [[Bool]] - component state [on/off]
 
| r2=[[Nothing]] |= Return value |= Return value
______________________________________________________________________________________
 
|x1= <code> [[vehicle]] [[player]] [[enableVehicleSensor]]  ["PassiveRadarSensorComponent",false]; // disables passive radar </code> |= Example 1
____________________________________________________________________________________________
 
| [[listVehicleSensors]], [[isVehicleSensorEnabled]] |= See also


|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>
[[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