Jump to content

Possibel to give the player 2 or more different items when an item is crafted?


Recommended Posts

Hello everybody!

 

I want to make something like this:

 

Player crafts an item at a chemstation.

When that item gets crafted, one or more other items also get added to the players inventory.

 

I know how to make a craftable item, but not how to make something like I described.
I don't even know if that is possible at all ...

 

(I might have to make a "temporary object" that will get crafted like a regular item, and then a script on the player that checks the players inventory for that item and if it gets added to the player, it removes it and adds the items that should get added)

Link to comment
Share on other sites

I'd say use a script with Event OnItemAdded() on the object. Additionally it should check if the player is using furniture (Which includes Workbenches).

 

Of course if the player would be sitting the Event would still fire but it's better than nothing

Edit:

My bad, OnItemAdded() works for ObjectRefs not Items.

 

But Event OnContainerChanged() can be applied to an item

https://www.creationkit.com/index.php?title=OnContainerChanged_-_ObjectReference

Link to comment
Share on other sites

  • Recently Browsing   0 members

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