Hello there
First of all, I would like to say, I'm a complete noobie at Papyrus. The coding is almost complete Chinese for me. I just don't understand it at all.
Now then, I'm making a mod which lets you breakdown soul gems to dust, and create new soul gems from that dust.
So far, I was able to make all constructable items in order and also make a "Soul Gem Apparatus" which lets you do the crafting by using it from your inventory menu.
This "Soul Gem Apparatus" is a Misc Item, which will need to have a script attached to it. That script will tell it to open a crafting menu.
So far by googling, (after a great hassle!) I have gotten to this script: (I don't know most of what it means, though...)
Scriptname SoulGemApparatusScript extends ObjectReference Armor Property NullReferenceArmor AutoObjectReference Property CraftingStationReference AutoEvent OnEquipped(Actor akActor) If( akActor == Game.GetPlayer() ) akActor.EquipItem( NullReferenceArmor, True, True ) Utility.Wait(0.1) akActor.UnequipItem( NullReferenceArmor, False, True ) CraftingStationReference.Activate( Game.GetPlayer() ) EndIfEndEvent
I have bound the Property "CraftingStationReference" to a piece of Furniture in a random test cell which is in fact a workbench.
I won't bind NullReferenceArmor to anything.
I can get this to work in game. I can also craft my soul gems.
There's only 1 thing missing: When I activate the "Soul Gem Apparatus", I need to close my inventory menu manually.
My question: Is there a way to close the menu automatically? (by adding something to the script)
Thanks in advance