Difference between revisions of "OnMenuOpenCloseEvent - ScriptObject"
Jump to navigation
Jump to search
imported>Google0013 m (As of Fallout 4 1.9.4, QuickContainerMenu is not a valid menu register. From Papyrus.log ```[08/07/2017 - 11:30:24AM] error: "QuickContainerMenu" is not a valid menu name.```) |
imported>Qazaaq (added menus cheat sheet) |
||
Line 1: | Line 1: | ||
'''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. | ||
== See Also == | == See Also == | ||
Line 83: | Line 39: | ||
*[[RegisterForMenuOpenCloseEvent - ScriptObject]] | *[[RegisterForMenuOpenCloseEvent - ScriptObject]] | ||
*[[UnregisterForMenuOpenCloseEvent - ScriptObject]] | *[[UnregisterForMenuOpenCloseEvent - ScriptObject]] | ||
[[Category:Scripting]] | |||
[[Category:Papyrus]] | |||
[[Category:Events]] |
Revision as of 19:31, 11 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
Event OnMenuOpenCloseEvent(string asMenuName, bool abOpening)
Parameters
- 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
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
These are the User Interface menus that Players interact with in game.
Key
- Name: The string identifier of the menu.
- Description: A short description of where or how the menu appears in game.
Notes
- Aliases and quests will automatically unregister for this event when the quest stops. Active magic effects will automatically unregister when they are removed.