• 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.

Creep full life when not in combat

Status
Not open for further replies.
Hi there,

I have tried like everything now and Im tired of trying to make this trigger..

I want a trigger wich gives creep full life when not in combat

Something like when a creep unit returns to its start position or when not in threat/combat; example you have to flee from the creep

But if you flee = Creep Unit gets full life again

P.S Not specific unit, GENERIC

Thx
Cheers!
 
Level 37
Joined
Mar 6, 2006
Messages
9,243
If a unit is attacked or it attacks, a timer starts. When the timer expires, the unit's health gets set to 100 %.

If there are enemy units within certain radius from the unit or the unit gets attacked/attacks again, the timer resets.

The system works for neutral hostile units, but is easy to modify to support other forces. You can easily customize the "threat range" and timer value. The defaults are 10 seconds and 800 distance units.
 

Attachments

  • Combat_Regen.w3x
    19.2 KB · Views: 50
If a unit is attacked or it attacks, a timer starts. When the timer expires, the unit's health gets set to 100 %.

If there are enemy units within certain radius from the unit or the unit gets attacked/attacks again, the timer resets.

The system works for neutral hostile units, but is easy to modify to support other forces. You can easily customize the "threat range" and timer value. The defaults are 10 seconds and 800 distance units.

You saved my day, and for that, I salute you with big respect!

And oc some +rep, not like you need more of that, but its the least I can do!

Cheers m8!
 
Status
Not open for further replies.
Top