setVehicleLock: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
mNo edit summary
m (Text replacement - "AgentRevolution" to "AgentRev")
 
(68 intermediate revisions by 12 users not shown)
Line 1: Line 1:
[[Category:Scripting Commands|SETVEHICLELOCK]]
{{RV|type=command
[[Category:Scripting Commands OFP Elite |SETVEHICLELOCK]]
[[Category:Scripting Commands ArmA|SETVEHICLELOCK]]


<h2 style="color:#000066">'''''vehicle'' setVehicleLock ''state'''''</h2>
|game1= ofpe
|version1= 1.00


|game2= arma1
|version2= 1.00


'''Operand types:'''
|game3= arma2
|version3= 1.00


'''vehicle:''' [[Object]]
|game4= arma2oa
|version4= 1.50


'''state:''' [[String]]
|game5= tkoh
|version5= 1.00


'''Type of returned value:'''
|game6= arma3
|version6= 0.50


[[Nothing]]
|arg= local
|eff= global


'''Compatibility:'''
|gr1= Object Manipulation


Version 2.33 required.
|descr= Sets vehicle lock. Possible values:
<br>
* "UNLOCKED"
* "DEFAULT"
* "LOCKED"
* "LOCKEDPLAYER"


'''Description:'''
|s1= vehicleName [[setVehicleLock]] lockState


Set how vehicle is locked for player.
|p1= vehicleName: [[Object]]


Possible values: UNLOCKED, DEFAULT or LOCKED.
|p2= lockState: [[String]]


|r1= [[Nothing]]


'''Example:'''
|x1= <sqf>_veh1 setVehicleLock "LOCKED";</sqf>


veh1 '''setVehicleLock''' "LOCKED"
|seealso= [[lock]] [[locked]] [[lockDriver]] [[lockCargo]] [[lockTurret]]
}}
 
 
<dl class="command_description">
 
<dt></dt>
<dd class="notedate">Posted on 2014-10-22 - 02:01 (UTC)</dd>
<dt class="note">[[User:AgentRev|AgentRev]]</dt>
<dd class="note">
In Arma 3:<br>
setVehicleLock "UNLOCKED" = same as "[[lock]] 0"<br>
setVehicleLock "DEFAULT" = same as "[[lock]] 1"<br>
setVehicleLock "LOCKED" = same as "[[lock]] 2"<br>
setVehicleLock "LOCKEDPLAYER" = same as "[[lock]] 3"
</dd>
 
<dt><dt>
<dd class="notedate">Posted on 2015-03-04 - 15:57 (UTC)</dd>
<dt class="note">[[User:Killzone_Kid|Killzone_Kid]]</dt>
<dd class="note">
DEFAULT lock is default vehicle lock when vehicle placed in editor. If player is in a group of AIs and not the leader, he will not be able to enter this vehicle as he will not have GetIn action for this vehicle.
</dd>
 
</dl>

Latest revision as of 23:05, 4 May 2024

Hover & click on the images for description

Description

Description:
Sets vehicle lock. Possible values:
  • "UNLOCKED"
  • "DEFAULT"
  • "LOCKED"
  • "LOCKEDPLAYER"
Groups:
Object Manipulation

Syntax

Syntax:
vehicleName setVehicleLock lockState
Parameters:
vehicleName: Object
lockState: String
Return Value:
Nothing

Examples

Example 1:
_veh1 setVehicleLock "LOCKED";

Additional Information

See also:
lock locked lockDriver lockCargo lockTurret

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


Posted on 2014-10-22 - 02:01 (UTC)
AgentRev
In Arma 3:
setVehicleLock "UNLOCKED" = same as "lock 0"
setVehicleLock "DEFAULT" = same as "lock 1"
setVehicleLock "LOCKED" = same as "lock 2"
setVehicleLock "LOCKEDPLAYER" = same as "lock 3"
Posted on 2015-03-04 - 15:57 (UTC)
Killzone_Kid
DEFAULT lock is default vehicle lock when vehicle placed in editor. If player is in a group of AIs and not the leader, he will not be able to enter this vehicle as he will not have GetIn action for this vehicle.