I wants to create inventory, but I’m stuck, therefore I ask you for the help.
I create a multiple hitbox for inventory slot and hotbar with unique name, but when I over coursor on hotbar or inventory slot, nothing is highlighted?
I want to use one simple texture for highlights, using hitboxposition variable, but i really dont know how to do it?
I can help in increments because asking anyone to help you with an inventory system, is a bit much considering the complexity. But I’ll do what I can given the time.
When you draw a hit box, the name you provide will be returned which you have set as hitboxname. Now when you go to compare this under HUD_Inv, the forloop, you compare the i1 or i2 it returns to 1 or 2 which is what you’re given. So that is an possible issue.
You want to create unique names for the slots, and that is do-able. You have to forloop the creation of the boxes you create for your inventory slots. The index of the forloop of course dictate the name of the hitbox. You can add a prefix, the ‘i’, but you need to add this prefix to the return index of the forloop when you check for hovers/clicks to draw.
You’ve done great so far, I hope this helps sheds some light. I will check this post tmrw.