way to detect ability level from the buff?

M

mc117

Guest
The way my spell works is a buff is cast on a hero. When the hero's life reaches a certain percentage, it removes the original buff and casts a new one on it.

Code:
Events
Unit - A unit is attacked

Conditions
(Life of (attacked Unit)) less than or equal to ((max life of (attacked unit)) x 0.20)
((Attacked unit) has buff Inner Spirit) Equal to True
((Attacked unit) has buff Spirit Release Equal to False

Actions
Unit - Remove Inner Spirit buff from (attacked unit)
Unit - Create 1 dummy cast for owner of attacked unit facing default building angle
Unit - Order last created unit to Human Priest - Inner Fire attacked unit
Unit - Add a 2.00 second generic timer to last created unit

Is there any way I can make detect the level of the original buff cast on the unit so that I can make the second buff the correct level? Or do I have to make a differnet buff for each level so i can detect each one?
 

SFilip

Gone but not forgotten
Reaction score
634
in jass buffs are considered as abilities - unit has a buff actually checks if the level of buff for that unit is 1.
i tried making conditions like that with higher levels, but never worked - it seemed to always return 1.
so i guess there is no way...
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top