• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

Out of Combat heal?

Status
Not open for further replies.
Level 8
Joined
Dec 9, 2009
Messages
397
How can I make it so when an enemy is no longer fighting anyone it regains it's HP/Mana?

Is there an event that can detect when a unit aggros someone, and when they give up and return?

I do not know jass.

Thanks for any info.
 
Level 37
Joined
Mar 6, 2006
Messages
9,243
Here's a simple system that gives units increased regen when not in combat.

I just used a timer for this. When a unit is not attacked or has not attacked during 10 seconds, it gets the regen bonus.

I made it support heroes only, but it's easy to change.

http://www.hiveworkshop.com/forums/pastebin.php?id=6wzaft

You could refine the system to take advantage of "Unit acquires a target" etc.
 
Status
Not open for further replies.
Top