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.