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

Unit Health = Variable?

Status
Not open for further replies.
Level 18
Joined
Aug 13, 2007
Messages
1,584
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)
 
Level 24
Joined
Feb 28, 2007
Messages
3,479
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.
Top