• 🏆 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!

Life Regeneration while fighting

Status
Not open for further replies.
Level 3
Joined
Oct 8, 2007
Messages
60
hi again, this is what im looking for:

while a unit is fighting that his life will not regenerate... how do i do that?
i want to use the trigger function, "generic unit event - a unit becomes attacked" and then turn it back on when it stopes from being attacked...
 
Level 11
Joined
Aug 25, 2006
Messages
971
You'll have to make the unit gain hp regeneration through a trigger. Then when the unit is attacked (turn of the hp regen trigger) and set a timer to 5 seconds. So that the timer will constantly be set to 5 seconds every time the unit is attacked. When the timer goes off, (the unit must have been out of combat for at least 5 seconds) turn the hp regen trigger back on.
 
Level 3
Joined
Oct 8, 2007
Messages
60
well i was acualy thinking about useing add abillity, i created a ability off unholy aura and set the life reg to -9000.00. is there a way that when the unit is being attacked it adds the abillity to the unit and when it is not attacked it removes the abbility?
 
Level 11
Joined
Aug 25, 2006
Messages
971
You can use the same method I put above. Except removing/adding an ability instead of disabling/reinabling a trigger.
However -9000 might make the life go down not just stand still.
 
Level 3
Joined
Oct 8, 2007
Messages
60
i dont understand what you mean, can you post sort of a trigger useing the unholy aura...
 
Level 3
Joined
Oct 8, 2007
Messages
60
oh... there a problem, these are heros, (makeing a rpg) and per level they get more str - and per str the health reg rises abit... so that with the aura wont work... how i pause the reg while infight :p?
 
Level 3
Joined
Oct 8, 2007
Messages
60
and another thing i got a problem with: i have a base armor of 40... and want the damaged reducment to be likeso: 1 armor = 0.19% damage reducment. for example: if the units armor is 47 - dmg would be reduced by 8.83%
 
Level 2
Joined
Oct 7, 2007
Messages
19
and another thing i got a problem with: i have a base armor of 40... and want the damaged reducment to be likeso: 1 armor = 0.19% damage reducment. for example: if the units armor is 47 - dmg would be reduced by 8.83%
Check out the "gameplay constants" in the advanced menu. There is a constant called "Combat - Armour Damage Reduction Multiplier".
 
Status
Not open for further replies.
Top