Difference between revisions of "Lock - ObjectReference"

From the CreationKit Wiki
Jump to navigation Jump to search
imported>Rhavlovick
m (1 revision: Clobber re-import by Henning)
 
imported>Catwheezle
(Added "see also" section items.)
 
Line 32: Line 32:
== See Also ==
== See Also ==
*[[ObjectReference Script]]
*[[ObjectReference Script]]
*[[Locking and Unlocking Doors]] tutorial.
*[[GetLockLevel - ObjectReference]]
*[[IsLocked - ObjectReference]]
*[[IsLocked - ObjectReference]]
*[[LockDoors (Procedure)]]
*[[SetLockLevel - ObjectReference]]
*[[UnlockDoors (Procedure)]]
*[[UnlockOwnedDoorsInCell - Actor]]
*[[GetLocked]] console command.
*[[GetLockLevel]] console command.
*[[Lock]] console command.
*[[Unlock]] console command.

Latest revision as of 00:14, 15 February 2012

Member of: ObjectReference Script

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.

Syntax[edit | edit source]

Function Lock(bool abLock = true, bool abAsOwner = false) native

Parameters[edit | edit source]

  • abLock: Whether to lock or unlock this lock.
    • Default: True
  • abAsOwner: 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

Return Value[edit | edit source]

None.

Examples[edit | edit source]

; Lock the door
SecurityDoor.Lock();


; Unlock the door, flagging the cell on the other side as public
PrivateDoor.Lock(false, true)

See Also[edit | edit source]