OnUnlock
The script attached to this event fires when an item has been unlocked. Giving experience to the unlocker, or even making sure they cannot unlock it in combat (using SetLocked to re-set the lock).
Trigger
Door or placeable was unlocked.
Function(s)
GetLastUnlocked() returns the object that unlocked OBJECT_SELF.
Remarks
Only placeables that can be opened can be locked or unlocked. Only when unlocking the door via. Open Lock skill or Key will trigger this. SetLocked will not, nor will DM Force lock.
Known Bugs
OnLock and OnUnLock didn’t use to work. As of patch version 1.29 (or probably 1.28), the events fire as they should.
See Also
Objects with Events | Door | Placeable Object | |
functions: | GetLastUnlocked |