I'm making a crafting menu to make new items using dragon souls as an ingredient.
The current plan is:
Read a book to gain a power that when used opens up a new smithing/crafting menu. - Done
When the power is used it also checks getActorValue for Dragon souls and adds the amount of Dragon Souls the player has as misc "Dragon Souls" items to their inventory.
Each item requires 1 Dragon soul misc item to craft.
Detect when an item is made using the OnStoryCraftItem Event then remove one dragon soul from the player.
When the menu is closed remove the Dragon Soul items from the players inventory.
Last step is the problem, is there a way for me to detect when the crafting menu is closed so I can run a script to remove the rest of the placeholder dragon soul items?