Way to run script on close crafting menu?

Post » Tue Dec 24, 2013 7:36 am

I'm making a crafting menu to make new items using dragon souls as an ingredient.

The current plan is:

Spoiler

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?

User avatar
Dominic Vaughan
 
Posts: 3531
Joined: Mon May 14, 2007 1:47 pm

Post » Mon Dec 23, 2013 7:17 pm

I'm assuming you have setup a custom forge to get the the menu up, you could try http://www.creationkit.com/IsFurnitureInUse_-_ObjectReference and while true do nothing until false. This works for furniture you have walked up to and activated, wether it works for one activated remotely in a dummy cell???

User avatar
No Name
 
Posts: 3456
Joined: Mon Dec 03, 2007 2:30 am


Return to V - Skyrim