Ok, so basically, I have a Barbarian hero who generates rage on every attack, and is supposed to lose rage over time, but only while he is out of combat.
I am looking for a way that I might go about detecting whether said Barbarian is in combat or not. Currently, all I have thought of is possibly checking to see if there are enemy units nearby, but this is able to be abused by standing withing range of units, but not actually attacking.
Is it possible to maybe do this with timers that reset every time the Barbarian attacks? I would think it is, but I'm relatively new to all the Jass/timer stuff and it sometimes gets a bit confusing.
Thanks in advance!
I am looking for a way that I might go about detecting whether said Barbarian is in combat or not. Currently, all I have thought of is possibly checking to see if there are enemy units nearby, but this is able to be abused by standing withing range of units, but not actually attacking.
Is it possible to maybe do this with timers that reset every time the Barbarian attacks? I would think it is, but I'm relatively new to all the Jass/timer stuff and it sometimes gets a bit confusing.
Thanks in advance!