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

Catch an ability level up

Status
Not open for further replies.
Level 11
Joined
Nov 23, 2013
Messages
665
Perhaps you could use a periodic events that checks the current ability level, using a integer condition?

  • Conditions
    • (Level of <Some Ability> for (<Some Hero>)) Equal to X
 
Level 39
Joined
Feb 27, 2007
Messages
5,023
With the event Dane posted, there is the event response Learned Hero Skill. And when the event fires the skill has already been leveled up, so if it was being learned the first time its level will be 1, and it's being leveled up the first time (second click) it will be level 2+.
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,202
An alternative approach is to make your system recreate the state when levelling up rather than tracking deltas. This means that when you level from level 1 to level 2 you destroy the level 1 state and then create a level 2 state instead. This is useful as you can apply the logic directly if the ability level gets set, eg by trigger, instead of having to iterate through all levels up to the appropriate one.
 
Status
Not open for further replies.
Top