andgarrett
New Member
- Reaction score
- 0
is there an easy way to show how many stacks of a given buff a unit has? if not, is there a hard way?
-Garrett
-Garrett
Well, I don't know how to do it in the data editor, but an easy way (at least I think it's easy) is adding texttags.
For that method:
Create two aditional effects (damage effects with 0 dmg).
Create a trigger wich triggers whenever a unit takes damage from the first damage effect you created.
Increase a custom value of that unit for every time this trigger runs.
Display the value of the custom value via a texttag.
Create another trigger wich triggers whenever a unit takes damage from the second damage effect.
Decrease the custom value.
Display the value/remove the texttag if it's 0.
This method only works on a small amount of buffs or your display is flooded with texttags.
(it's not a good method, but should somehow work)
You can find out the buff positions via the "unit behavior" function. You put in the unit and the behavior index and get the gamelink (stringname) of the behavior.
just loop through all the indexes and display the count
for the position... should be a start offset from the bottom - index * something (as y) it's a bit of testing