ShowOff:OnLockpickMenuClose

From GECK
Jump to: navigation, search

An event handler added by the ShowOff NVSE Plugin version 1.50.

Description

This event runs whenever the lockpick menu is closed.

Dispatched Args

GetSelf / GetSelfAlt will return the menu target, i.e. the reference being lockpicked.

The arg dispatched to handlers is:

  1. The reason why the lockpick menu closed (an int).
    0 = lock opened,
    1 = player failed to force open the lock,
    2 = player failed to force open the lock by running out of lockpicks (only possible with the ForceLockUsesBobbyPins option in lStewieAl's Tweaks),
    3 = player exited manually.

Syntax

Use SetEventHandler / SetEventHandlerAlt with the event name "ShowOff:OnLockpickMenuClose".

Handler Script

A skeleton handler script for this event:

scn OnLockpickMenuCloseUDF

begin Function { int iReason }
   ref rMenuTarget = GetSelfAlt  ;* GetSelf would do the same thing here
   ; do code
end

Example

SetEventHandlerAlt "ShowOff:OnLockpickMenuClose" OnLockpickMenuCloseUDF 1::1

Will register OnLockpickMenuCloseUDF as an event handler for the event, and it should only be called if the player failed to break open the lockpick by force (without accounting for the ForceLockUsesBobbyPins option in lStewieAl's Tweaks).

See Also