Author Topic: Animated Health Bar  (Read 6158 times)

0 Members and 1 Guest are viewing this topic.

Offline DankNessProvides

  • Newbie
  • *
  • Posts: 26
  • Karma: -3
Animated Health Bar
« on: June 07, 2016, 06:51:03 PM »
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.
« Last Edit: June 07, 2016, 07:12:35 PM by DankNessProvides »

Offline MrPresident

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 2728
  • Karma: 430
    • |G4P| Gman4President
Re: Animated Health Bar
« Reply #1 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.

Offline DankNessProvides

  • Newbie
  • *
  • Posts: 26
  • Karma: -3
Re: Animated Health Bar
« Reply #2 on: June 08, 2016, 12:43:47 AM »
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.

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 :)
« Last Edit: June 08, 2016, 01:11:31 AM by DankNessProvides »

An Error Has Occurred!

array_keys(): Argument #1 ($array) must be of type array, null given