Open main menu

UESPWiki β

Morrowind Mod:XGetLockLevel

< Mod / Morrowind: Morrowind Mod: MWSE

A function from MWSE update by Merzasphor.

Returns the lock level of a door or container. This function returns -1 for doors/containers that have never been locked and for items that aren't doors or containers.

This returns the lock level regardless of whether the item is locked or unlocked. Use GetLocked to determine the state of the lock.

Lock level is stored as a signed short (16 bits, max value = 32,767). Values less than 0 do not survive saving, exiting, and reloading. They are converted to their absolute value and the door/container is flagged as unlocked.

SyntaxEdit

lockLevel (short): ref->xGetLockLevel

ExampleEdit

; Gets the lock level of the player's target and stores it in lockLevel.
long target
long lockLevel
setx target to xGetPCTarget
setx lockLevel to target->xGetLockLevel

See AlsoEdit