Jump to content

Recommended Posts

Posted

I'd like to give a certain misc item (hammer or wrench) the ability to open the campfire crafting menu if equipped, anyone know how I'd do it?

Posted (edited)

You can't equip a misc item. You'd have to make the misc item into either a piece of armor or a weapon. Personally I'd recommend making it a weapon so that it doesn't unequip something that you are wearing. It makes more sense that you'd have to unequip your weapon to use something like a wrench or a hammer.

Give your new hammer/wrench weapon a script with an OnEquip block that opens the campfire menu. Something like this maybe:

begin OnEquip player
player.showrecipemenu CampfireRecipes
end

You might also want to make the hammer/wrench unequip itself.

Edit:

Another way to do it would be to make it an ingestible with a script. The script would also open the campfire menu but would also give the player a new copy of the hammer/wrench so that it effectively isn't consumed when you ingest it and you can use it over and over again.

 

Edited by madmongo
Posted (edited)

Added it to switchblade and renamed it to crafting knife, works great thanks

How would you edit the script so it only runs if player is in sneak?

Edited by Nargo44
  • Recently Browsing   0 members

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