Difference between revisions of "OnMenuOpenCloseEvent - ScriptObject"

From the Fallout4 CreationKit Wiki
Jump to navigation Jump to search
imported>Mator
imported>Scrivener07
m (→‎Notes: >_> seems I can preview as much as I like and still miss some typos.)
 
(4 intermediate revisions by 3 users not shown)
Line 1: Line 1:
[[Category:Scripting]]
[[Category:Papyrus]]
[[Category:Events]]
'''Member of:''' [[ScriptObject Script|ScriptObject]]
'''Member of:''' [[ScriptObject Script|ScriptObject]]


Line 31: Line 28:
endEvent
endEvent
</source>
</source>
== Menus ==
{{Template:Menus}}


== Notes ==
== Notes ==
*Aliases and quests will automatically unregister for this event when the quest stops. Active magic effects will automatically unregister when they are removed.
*Aliases and quests will automatically unregister for this event when the quest stops. Active magic effects will automatically unregister when they are removed.
*Valid menu names:
*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.
**BarterMenu
**BookMenu
**BSOverlayMenu
**CompanionMenu
**Console
**ConsoleNativeUIMenu
**ContainerMenu
**CookingMenu
**CreditsMenu
**CursorMenu
**DebugTextMenu
**DialogueMenu
**ExamineMenu
**FaderMenu
**FavoritesMenu
**GenericMenu
**GiftMenu
**HUDMenu
**InventoryMenu
**LevelUpMenu
**LoadingMenu
**LockpickingMenu
**LooksMenu
**MagicMenu
**MainMenu
**MessageBoxMenu
**MultiActivateMenu
**PauseMenu
**PipboyMenu
**PromptMenu
**QuantityMenu
**QuickContainerMenu
**ScopeMenu
**SitWaitMenu
**SleepWaitMenu
**SPECIALMenu
**StatsMenu
**SWFLoaderMenu
**TerminalHolotapeMenu
**TerminalMenu
**VATSMenu
**VignetteMenu
**WorkshopMenu
**Workshop_CaravanMenu


== See Also ==
== See Also ==
Line 84: Line 40:
*[[RegisterForMenuOpenCloseEvent - ScriptObject]]
*[[RegisterForMenuOpenCloseEvent - ScriptObject]]
*[[UnregisterForMenuOpenCloseEvent - ScriptObject]]
*[[UnregisterForMenuOpenCloseEvent - ScriptObject]]
[[Category:Scripting]]
[[Category:Papyrus]]
[[Category:Events]]
[[Category:User Interface]]

Latest revision as of 09:43, 26 February 2018

Member of: ScriptObject

Event called when menus are opened or closed - if this active magic effect/alias/form is registered for it.

This event will only be sent to the specific script that registered for it. Other scripts attached to the same form/alias/active magic effect will not receive the event unless they also register.

Syntax[edit | edit source]

Event OnMenuOpenCloseEvent(string asMenuName, bool abOpening)

Parameters[edit | edit source]

  • asMenuName: Name of the menu opening / closing. E.g. "LockpickingMenu", "ContainerMenu", etc.
  • abOpening: True if the menu is opening, false if the menu is closing

Example[edit | edit source]

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

Menus[edit | edit source]

These are the User Interface menus that Players interact with in game.

Name Description
BarterMenu
BookMenu
Console
ConsoleNativeUIMenu
ContainerMenu
CookingMenu
CreditsMenu
CursorMenu
DialogueMenu
ExamineMenu
FaderMenu
FavoritesMenu
GenericMenu
HUDMenu
LevelUpMenu
LoadingMenu
LockpickingMenu
LooksMenu
MainMenu
MessageBoxMenu
MultiActivateMenu
PauseMenu
PipboyMenu
PromptMenu
ScopeMenu
SitWaitMenu
SleepWaitMenu
SPECIALMenu
TerminalHolotapeMenu
TerminalMenu
VATSMenu
VignetteMenu
WorkshopMenu
Workshop_CaravanMenu

Key

  • Name: The string identifier of the menu.
  • Description: A short description of where or how the menu appears in game.


Notes[edit | edit source]

  • 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.

See Also[edit | edit source]