🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

Inventory System Unity (Third Person)

Started by
0 comments, last by M_keyla_M 4 years ago

I wish to create an inventory system.
I had the idea to have a cauldron have its own inventory. The (third person) player adds objects to that inventory by dropping objects into the pot (hitting the collider of the water, the water is a separate object)
The crafting system uses that inventory to create potions.
The only issue is that I’m very stuck with getting the cauldron to work with an inventory. I already made a UI but I don’t get how to make the cauldron register when the object hits the collider and to add that object to the UI
Any tips? Or help? I really suck at scripting

Here's what im thinking so far, please add to it:

Inventory System

What scripts do I need?

  • Inventory (inventory for the cauldron so you can craft potions)
  • Inventory slot?
  • Item (so my 3d objects can be added to the inventory)
    • How do I turn my 3D object into an item though? Need additional script?
  • Collider script? (to notify the inventory when an object has passed through the collider of the water in the cauldron)

Inventory script

  • Public class Inventory : Monobehaviour?
  • ????


Item script (complete?)

  • Public class Item : ScriptableObject (so i can create items without the need for codes every 3 seconds)
  • [CreateAssetMenu (menuName = “Inventory/Item”)}
  • Public Sprite Image
  • Public string Name

Collider script?

  • ????

This topic is closed to new replies.

Advertisement