• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

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,240
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: 46
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