Jump to content

[LE] [Papyrus] Opening a crafting menu with a misc item


SevenBlue

Recommended Posts

Hey I've been poking around trying to open a new custom crafting menu by clicking on a misc item in the inventory. So far I've managed to set up a new crafting menu just fine by placing a new furniture item in a dummy cell. I have a basic idea of how to get the script working to access the menu by clicking on the item but in it's current iteration I get the "cannot equip this item" message when I click on it.

 

Ideally I want it to work like the mortar and pestle in campfire by chesko.

 

Here's the code in question

Scriptname SB_SkoomaCraftingBootup extends ObjectReference


Actor Property PlayerRef Auto
ObjectReference Property SB_SkoomaTable Auto


Event OnEquipped()


	SB_SkoomaTable.Activate(PlayerRef)
	
EndEvent

Any assistance and guidance would be most valued.

Link to comment
Share on other sites

Put a debug message in there to know if OnEquipped is triggering or not, maybe it's the activation itself that's failing, because from what I remember OnEquipped should work fine with misc objects even if the don't actually equip and you get the can't equip message.

Link to comment
Share on other sites

Something funky is going on.

 

I added the debug and it didn't pop up, but something is happening when I click the item. When I do the compass pops up and after I close the inventory I can't open my inventory or magic list but I can open the save menu and such.

Link to comment
Share on other sites

Pretty funky indeed. This should work even if the crafting station is in another room, I think, it's persistent after all since it's in a property. But, just in case, make sure you are in the same room as the furniture when equipping the item.

 

Since you mention chesko's camfire, you could peek at it's scripts if he packs the sources, see how he handled it.

Edited by FrankFamily
Link to comment
Share on other sites

Yeah the item works as intended when I coc to the dummy cell. Well kind of. It shifts the player over and has them start using the furniture.

 

It looks like chesko does it by having the furniture spawn in front of the player invisibly using his campfire system. But I took a look at scrimshaw in hunterborn too and that one is done using the same method I'm trying to but I can't tell what I'm doing wrong.

Link to comment
Share on other sites

If the player's equipping the item from inside the inventory menu then you'll need to get out of the inventory menu before activating the remote furniture.

 

Try adding calls to disable and then enable player controls and add a Wait(0.01) before you do the Activate line.

Link to comment
Share on other sites

Oh excellent! That works perfectly! Do you happen to know if it's possible to disable the "cannot equip this item" for my item in question? If not no big deal really. But thank you so much for your help : )

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...