• 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!

Unit Health = Variable?

Status
Not open for further replies.
Well you have to make a real to integer conversion if you want to make it look like that
1337 HP

otherwise it looks like that 1337.000 HP


Well, then you need one more action and one more Variable.

Life_Integer
Type: Integer

  • Actions
    • All - Set Life_Integer to Life (again under Conversion - Convert Real to Integer)
And then:

  • Actions
    • Leaderboard - Set the label of Player 1 (Red) to Life_Integer (under Convert Integer to String)
 
Why do you need a real and a integer, dosen't this work just as fine?
  • BuildingsHpLeaderboard
    • Events
      • Time - Every 0.05 seconds of game time
    • Conditions
    • Actions
      • Leaderboard - Change the label for "YourPlayer" in "Your Leaderboard" to (String((Life of (Your Unit))))
Edit, tested it myself and it worked just fine.
 
Status
Not open for further replies.
Back
Top