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

Hero level up finding

Status
Not open for further replies.
Level 4
Joined
Aug 15, 2010
Messages
53
Hi, I have a little question.

How can I find Hero levels?
for example; Heroes sometimes rise to levels 2 or 3 instead of 1 when they gain more experience than necessary. But with trigger I can not determine this. For example, if the hero gets up every level I want to give 3 lumber, but if it goes up 2 levels it gives 3 again.
 
You could record the last level of the hero...
Something of the sort of the following, but you'll have to index your heroes:
  • Events
    • Hero gains a level
  • Conditions
  • Actions
    • Set var_curretLevel = current level of triggering unit
    • Set var_levelDifference = var_currentLevel - var_HeroLastLevel[indexOfHero]
    • Set var_WoodToGive = var_LevelDifference * 3
    • Give var_WoodToGive to triggering player
    • Set var_HeroLastLevel[indexOfHero] = var_curretLevel
Edit: @Abovegame well, that was fast...
 
Last edited:
Status
Not open for further replies.
Back
Top