• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Get required EXP to reach next hero level.

Status
Not open for further replies.
I am in need of this information so I can tell the player how far he is to reach the next level.

There is a function:
  • Game - Display to (All players) the text: (String((Hero experience of (Triggering unit))))
This will only give me the current EXP of the unit. While I need that as well, I can't seem to figure out how to get the required EXP.

Thoughts?
 
Level 12
Joined
Feb 22, 2010
Messages
1,115
You won't do some calculations, he already did that for you.Just use the formula.
 
Maybe...

Set integer = GetHeroExperience
Increase HeroLevel by 1 (hide graphics)
Set integer2 = GetHeroExperience - integer
Set HeroLevel = HeroLevel - 1 (hide graphics)

integer2 should be the exp you need to your next level.

Way too much work.
The method Ceday posted is really simple so I'm going with that. It works fine.
 
Status
Not open for further replies.
Top