I'm working on an ability for my map which is inspired by the 'Anoint' skill in "Build and Brawl"'s Naga race.
My hero starts with an ability (tentatively called 'Anoint') which provides a permanent buff to a target player-owned unit. Only one unit can be Anointed at a time, and the Anointed unit shares the same inventory as the hero, is the target of the hero's other skills, and (this is the part which isn't working yet) gets stat buffs which are dependent upon the hero's skillpoint allocation. For example, if the hero puts 2 points into their first skill (a healing spell which affects an AoE around the Anointed unit), the Anointed unit also passively gets a level 2 bonus to maximum health and health regeneration.
The problem that I'm having is that I want the Anointed unit's buffs to update when the hero allocates skill points. I can't work out how to detect this without setting up a recurring timer every second or so which checks the hero's skill levels against where they were, which seems inefficient. Is there some cool trick which I can use to detect this via triggers, or am I going to have to use a timer?
I'm working in JASS.
Thanks for your help.
My hero starts with an ability (tentatively called 'Anoint') which provides a permanent buff to a target player-owned unit. Only one unit can be Anointed at a time, and the Anointed unit shares the same inventory as the hero, is the target of the hero's other skills, and (this is the part which isn't working yet) gets stat buffs which are dependent upon the hero's skillpoint allocation. For example, if the hero puts 2 points into their first skill (a healing spell which affects an AoE around the Anointed unit), the Anointed unit also passively gets a level 2 bonus to maximum health and health regeneration.
The problem that I'm having is that I want the Anointed unit's buffs to update when the hero allocates skill points. I can't work out how to detect this without setting up a recurring timer every second or so which checks the hero's skill levels against where they were, which seems inefficient. Is there some cool trick which I can use to detect this via triggers, or am I going to have to use a timer?
I'm working in JASS.
Thanks for your help.