hoangkien Posted December 7, 2023 Share Posted December 7, 2023 (edited) I'm working on a mod that lets player collect spell pages on their adventures and use them to create spell tomes. I've got the basic stuff like custom recipes and crafting station figured out, but now I want to create a miscellaneous item that when selected in the inventory, instead of a message that says the player can't equip this item, it opens the crafting menu, similar to the mod Portable Alchemy. This is the script that I tried on my Misc item using various guides: Event OnEquipped(Actor akActor) if akActor == Game.GetPlayer() CraftingTable.Activate(akActor) #CraftingTable is just a stand-in name for the object I'm referencing. endIf endEvent It compiled successfully, but when I test it in game, nothing happened. Any idea how I could make this work, or is it outside the scope of Creation Kit? I am very new to modding, so I don't know if this is a stupid question or not. Edit: I was mistaken. I realized that it did open the crafting menu if I equipped it in the world instead of the inventory. However it is still a problem for me as I want it to open the menu while still in the inventory. I could use a lesser power, but I want to know if this idea is possible before giving up. Edited December 7, 2023 by hoangkien Link to comment Share on other sites More sharing options...
shazdeh2 Posted January 6 Share Posted January 6 Try this, so user has to close the menu first: While Utility.IsInMenuMode() Utility.Wait(0.1) EndWhile ; activate your menu Link to comment Share on other sites More sharing options...
IsharaMeradin Posted January 6 Share Posted January 6 The following is modified from an existing functioning script. This will allow your object to bring up your custom crafting table while still in the inventory window. The inventory window will need to be re-opened by the player if desired once finished crafting. Scriptname RemoteOpenCraftingTableSampleScript extends ObjectReference ObjectReference Property myCraftingTable = None Auto Event OnEquipped(Actor akActor) If akActor == Game.GetPlayer() Game.DisablePlayerControls(False, False, False, False, False, True) ; Exit menu Utility.Wait(0.01) myCraftingTable.Activate(akActor) ; activate crafting table interface Utility.Wait(0.01) Game.EnablePlayerControls(False, False, False, False, False, True) ; Reenable menu EndIf EndEvent Link to comment Share on other sites More sharing options...
Recommended Posts