GetInteractionType

From ESOUI Wiki

Jump to: navigation, search

This function returns an InteractionType constant indicating whether the player is in an interaction — that is, a state of being in which the player-character is engaged with some object in the game world.

As an example, when the player activates a crafting station in the world, they enter an interaction with it. During that interaction, the player loses control of their character, and menus and add-ons are allowed to call functions to craft, deconstruct, research, improve, and refine items. The game doesn't care what state any menus are in; for example, an add-on can deconstruct items at any time during a crafting interaction, even if the "deconstruction" submenu isn't visible. When the player takes some action to close the menu, the menu calls EndInteraction(INTERACTION_CRAFT) to end the crafting interaction, such that the player regains the ability to move and loses the ability to perform crafting functions.

Example

-- Forcibly take the player out of whatever interaction they're in.
--
EndInteraction(GetInteractionType())

External links

Personal tools
Namespaces
Variants
Actions
Menu
Wiki
Toolbox