General > Developers Corner
Animated Health Bar
DankNessProvides:
I am making a custom HUD and I am quite new to GLua and what I wish to know is how do I make a health bar that will actually slide to the new updated health rather than just jump to it as that looks rather bad and I want to make a nice looking hud.
I would also like somewhere where I can find a basic easy to edit TTT hud can be found or a guide on doing it as I want to start making a HUD for a community for their TTT server already done their DarkRP one.
MrPresident:
You could use a timer to update the health bar. When the health changes, the timer will update the bar length one unit at a time until it reaches the current health. You'd just have the track the bar value separately from the health value.
I've done something similar to this in a gamemode UI I worked on some time back. It's a neat idea.
DankNessProvides:
--- Quote from: MrPresident on June 07, 2016, 07:35:14 PM ---You could use a timer to update the health bar. When the health changes, the timer will update the bar length one unit at a time until it reaches the current health. You'd just have the track the bar value separately from the health value.
I've done something similar to this in a gamemode UI I worked on some time back. It's a neat idea.
--- End quote ---
Only issue with that is my coding ability extremely bad at coding and decently fast learner :/. All I need is an explanation or a wiki page for it :)
An Error Has Occurred!
array_keys(): Argument #1 ($array) must be of type array, null given
[0] Board index
Go to full version