Description
Wiki Description
Locks or unlocks this object. If told to lock it, and no lock is attached, a very easy lock will be attached. If the object is open, and it is told to lock it, the object will be snapped closed.
Documentation Comment
Lock/unlock this object. If told to lock it, it will add a lock if it doesn't have one. If locked/unlocked as the owner on a door,
the adjoining cell will be made public/private as appropriate
Parameters
boolabLock=true
CK Wiki Description
Whether to lock or unlock this lock.
- Default:True
boolabAsOwner=false
CK Wiki Description
If true, and on a door, it will behave as if the owner unlocked or locked the door, and flag the adjoining cell as public or private as appropriate.
- Default:False
Examples
; Lock the door
SecurityDoor.Lock();; Unlock the door, flagging the cell on the other side as public
PrivateDoor.Lock(false, true)Auto-Generated Example
bool myBool__abLock
bool myBool__abAsOwner
myObjectReference__toCallFunctionOn.Lock(myBool__abLock, myBool__abAsOwner)Related Pages
- Locking and Unlocking Doors tutorial.
- ObjectReference.GetLockLevel()
- ObjectReference.IsLocked()
- LockDoors (Procedure)
- ObjectReference.SetLockLevel(...)
- UnlockDoors (Procedure)
- Actor.UnLockOwnedDoorsInCell()
- GetLocked console command.
- GetLockLevel console command.
- Lock console command.
- Unlock console command.
