🎉 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!

Potion Crafting system (Third Person)

Started by
8 comments, last by M_keyla_M 4 years ago

I wish to create a potion crafting 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)
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

Advertisement

M_keyla_M said:
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 … I really suck at scripting

Trying to understand what you're asking. It doesn't seem to be a design problem (you said you have a UI, presumably an ingredient wheel or grid) - is it a scripting problem? How to code the feature, is that what you're asking?

-- Tom Sloper -- sloperama.com

spawn the actors→get the cauldrons inventory & add these actors to object/data to the cauldrons inventory array.

When a combine is successful you'll want to destroy those actors that are in the cauldron. Store them in an array so you can reference them to destroy actor after you've removed them from the inventory they are referenced in.

@undefined Sorry it is the scripting I’m struggling with yes!

@undefined Considering the fact that I’m a noob when it comes to game dev…I have no idea what you’re talking about

or at least no way to know how to implement that

What are you using? An engine like Unity, Unreal, godot, or one of the many others, or are you using a programming language like C#, C++, C, Python, Java, Perl, or one of the many others?

@alberth im Using unity with C#

but I’m not good at scripting at all

That is to be expected, you cannot become a scripting master in one month ?

Perhaps post your code, so others can have a look? I cannot help you (you are one month ahead of me in C# and Unity at least), but likely others can help you.

@alberth haha I will post my code tomorrow and hopefully someone can tell me what’s going so horribly wrong

This topic is closed to new replies.

Advertisement