• 🏆 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!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece!🔗 Click here to enter!

[Solved] "Increase level of ability for unit" increases it to the last level, instead of to the next

Status
Not open for further replies.
Level 15
Joined
Sep 6, 2015
Messages
576
  • Reincarnation
    • Events
    • Unit - Kel'Thuzad (Lich) 0149 <gen>'s life becomes Equal to 0.00
    • Conditions
    • Actions
    • Unit - Increase level of Reincarnation (Neutral Hostile) for (Triggering unit)
or
  • Reincarnation
    • Events
    • Unit - Kel'Thuzad (Lich) 0149 <gen>'s life becomes Equal to 0.00
    • Conditions
    • Actions
    • Unit - Set level of Reincarnation (Neutral Hostile) for (Triggering unit) to ((Level of Reincarnation (Neutral Hostile) for (Triggering unit)) + 1)
 
Level 20
Joined
Aug 13, 2013
Messages
1,696
You could also debug how many the event runs by creating an integer counter and show the message so you will notice how that trigger behaves. Also that integer can be the parameter for that setting ability function.
 
Level 15
Joined
Sep 6, 2015
Messages
576
I've found a solution:

  • Reincarnation
    • Events
    • Unit - Kel'Thuzad (Lich) 0149 <gen>'s life becomes Equal to 0.00
    • Conditions
    • Actions
    • Unit - Increase level of Reincarnation (Neutral Hostile) for (Triggering unit)
    • Trigger - Turn off (This trigger)
    • Wait 10.00 seconds
    • Trigger - Turn on (This trigger)
Thanks for help anyway.
 
Level 24
Joined
Aug 1, 2013
Messages
4,657
Life becomes equal to value is horrible.

If for example, you have "becomes equal to 10.00" and the life is 11 and the unit is damaged to 9, then the event didnt fire.

I guess that the only reason why 0.00 works is that the life is set to that value when the unit dies.

Use "life becomes less than 0.41"
 
Status
Not open for further replies.
Top