Lock - ObjectReference

From the CreationKit Wiki
Revision as of 15:27, 18 October 2011 by imported>Rhavlovick (1 revision: Clobber re-import by Henning)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

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

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

Parameters

  • 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

None.

Examples

; Lock the door
SecurityDoor.Lock();


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

See Also