So, for the first time I’m looking into developing a Hot Bar. To get tips/hints/ideas I’ve looked at some models. They all seem to work on a similar premise, chiefly creating ‘slots’, setting off a loop, and then populating the slots via a ‘TempSlot’, for example:
I think I understand the concept, and it’s a neat way of getting some control over the design. However, if I understand this correctly, the hotbar is populated every time a player joins the game or respawns? All good, but, what happens if I want to dynamically update during the game while the player is alive and kicking?
To clarify, I want to create a small circle at the bottom right of each icon (weapon), with a TextLabel inside. This textlabel can then be updated via player variables during the game. This means I can add an ‘ammo quantity’ to the weapon which decreases after every shot. Here’s an example of how it should look:
And this is as far as I’ve got. The “3” in the white circle can be loaded with whatever number, from whatever variable, on entering the game or respawning, but during an intense melee, for example? … logically, not working. Once generated those slots are fixed, no children/dependents to access or write to.
If I change any variables in the TempSlot, mid-game, nothing happens, either, because logically the TempSlot is nothing more than a temporary container.
I’ve seen this work in other games, but I’m not seeing how this is logically possible. I’m certainly no ‘Pro’ and still very much learning, but this has me scratching my head.
I’m not looking for code/script - that’s not the way I like to work. Anyway, I’ve been trying so many ideas, trying to get this to work, the code’s all over the place, by now. I learn way more by struggling through things myself. But, if anyone knows of any good tutorials or guidance anywhere, that would be great!!
(Or if anyone was willing to take the time to guide me through this privately, I’d willingly make it profitable :-))
Please don’t post some random tutorial from YouTube. I think I’ve been through every one of those. They all seem to cover the exact same approach I’ve detailed above, but NO OPTION to change variables inside the hotbar ‘on-the-fly’. That said, maybe there’s a tutorial somewhere, that I’ve missed.
Thanks for any help!! Truly appreciated
-- This is an example Lua code block
Please do not ask people to write entire scripts or design entire systems for you. If you can’t answer the three questions above, you should probably pick a different category.