So, I’m trying to create a menu that pops up whenever you right click an item in the inventory… In that menu I would like to have buttons, but I want the buttons to be different depending on which Item I have selected. I have been searching all over the internet even tried getting help from AI, but I need a better example or explanation on how to achieve this. If you can help feel free to respond. Thanks
Well not sure this is a beginner question or you have something you crafted but here is an example that I just googled.
PS: AI is a good assistant but not a good developer.
Yes, I’m a beginner. That tutorial doesn’t help me. But I appreciate Ur efforts.
I need the buttons to change based on which Item I have selected. say for instance I select a food item it will have the actions (Eat, Smell, Drop) if I select a Weapon for instance, it will have the Actions (Equip, Load, Unload, Drop) just for example. I couldn’t find any useful tutorials on this..
No worries, everything you do in programming has to have a logical base for it. Computers are stupid and they cannot know what you clicked from get go.
So lets say you have an inventory, you can put some item images over there, but they are just images for the program.
Unless you define the boxes with data of what item it is, what is their image, how many items in that slot. If that is defined
OnClick you can retreive those and make changes and set back.
There is a lot of things involved in this however you have to start from somewhere if you will do this.
Try to start from something like this watch step by step, you can get stuck ask specific parts of problem you having. Community would help.
When you start working with data, data structures slowly it will get easier. Just replicating that would be a good enough inventory system for you.
While doing thing about the item specific you need in your game , like consumable, use on pickup, crafting reagent, equipable etc.
Thanks man.
Honestly, I already have an inventory system implemented. Just trying to improve on it. Here’s what I got as far as items displaying actions
and Im not really sure where to go beyond this point
try to replicate the tutorial