Background for Starfield
Member of the ScriptObject script
eventOnMenuOpenCloseEvent(stringasMenuName, boolabOpening)

[DEV SERVER] Loading description...


Caveats

CK Wiki - Notes

  • Aliases and quests will automatically unregister for this event when the quest stops. Active magic effects will automatically unregister when they are removed.
  • If you want a script to do things after a terminal has been 'exited' that has been displayed through a holotape from the pipboy, you need to register for the pipboy menu. TerminalMenu and TerminalHolotapeMenu will not work. When the terminal is 'exited', you are send back to the pipboy menu.

Parameters

stringasMenuName

CK Wiki Description

Name of the menu opening / closing. E.g. "LockpickingMenu", "ContainerMenu", etc.

boolabOpening

CK Wiki Description

True if the menu is opening, false if the menu is closing


Examples

Function SomeFunction()
  RegisterForMenuOpenCloseEvent("LockpickingMenu") ; Before we can use OnMenuOpenCloseEvent we must register.
EndFunction

Event OnMenuOpenCloseEvent(string asMenuName, bool abOpening)
    if (asMenuName== "LockpickingMenu")
        if (abOpening)
        Debug.Trace("Lockpicking menu is open!")
        endif
    endif
endEvent

Auto-Generated Example

Scriptname MyCoolScript extends ScriptObject

event OnMenuOpenCloseEvent(string asMenuName, bool abOpening)
    Debug.trace("Event received - OnMenuOpenCloseEvent: asMenuName = " + asMenuName + " abOpening = " + abOpening)
endEvent

Related Pages


Additional References

View this event’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.