Background for Starfield
Member of the ObjectReference script
voidfunctionLock(boolabLock=true, boolabAsOwner=false, boolabTraverseLinkedLockables=true)Native

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. Can also optionally lock or unlock linked lockable reference


Parameters

  1. boolabLock=true

    CK Wiki Description

    Whether to lock or unlock this lock.

    • Default:True
  2. 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
  3. boolabTraverseLinkedLockables=true


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
bool myBool__abTraverseLinkedLockables

myObjectReference__toCallFunctionOn.Lock(myBool__abLock, myBool__abAsOwner, myBool__abTraverseLinkedLockables)

Related Pages


Additional References

View this function’s page on the Fallout 4 Creation Kit Wiki

Some data provided by the Fallout 4 Creation Kit Wiki. Licensed under the Creative Commons Attribution-Share Alike 4.0 license.