• Check out the results of the Techtree Contest #19!
  • Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.
  • Create a void inspired texture for Warcraft 3 and enter Hive's 34th Texturing Contest: Void! Click here to enter!
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!

Life percentage window

Status
Not open for further replies.
Hmm, I'd probably go with a GetLocalPlayer mulitboard that updates every few seconds. Just set a real variable to your unit's health percentage and update your multiboard with that or something along those lines. If you want to get real crazy with it, you could convert that to a string so say you Create an 'I' for every 5 or 10% of that units health; so at max health it looks like IIIIIIIIIIIIII, if you wanted to use something like that instead.
 
There is a GUI function get a unit's % life, I'm pretty sure.

Anyway, it is easy to calculate like:
current health / max health * 100 = percent health remaining

You can display this number the same way you display the timer. Update it each second or whatever and display the timer and the % life.

EDIT:
I thought you wanted it inside a multiboard with other stuff.

A multiboard might be the best way to do it.
 
Status
Not open for further replies.
Back
Top