No HP regeneration

Level 3
Joined
Jul 3, 2009
Messages
31
i think you can by using buffs/skill that would decrease hp regeneration. but that would be quite difficult for heroes because their hp regen changes through strength. You can make the trigger look like:
  • HP regen stop trigger
  • Events:
  • A unit is attacked.
  • Conditions:
  • Actions:
  • Make (Dummy Unit) cast (decrease HP regen skill of some kind) on Attacked unit.
  • OR
  • Give (Ability like Endurance aura with negative HP regen) to Attacked unit
  • Wait X seconds
  • Remove (Ability) from Attacked unit.
I know what i did sucks but i hope this helped. :p
 
Level 27
Joined
Jan 26, 2007
Messages
4,788
Or you can do it the other way around, which might be a bit more daring:

Let nobody have HP regeneration, except when they're not in battle.
It sounds the same, but it isn't ^^

Just set all HP regeneration-things to 0.00, so nobody will regenerate HP and then do it with triggers.
This is not as hard as it may seem, all you need to do is define the unit type and HP regeneration at map init (with variables, in a simple table), then loop a trigger (every .25 sec would be good I think), pick all units and add the HP that is defined at map init to them.

If they are being attacked, set a boolean variable to true, when the variable is true, the unit won't regenerate.
Ehh... seems easier than doing it with buffs, according to me.
 
Level 15
Joined
Aug 11, 2009
Messages
1,607
Or you can do it the other way around, which might be a bit more daring:

Let nobody have HP regeneration, except when they're not in battle.
It sounds the same, but it isn't ^^

Just set all HP regeneration-things to 0.00, so nobody will regenerate HP and then do it with triggers.
This is not as hard as it may seem, all you need to do is define the unit type and HP regeneration at map init (with variables, in a simple table), then loop a trigger (every .25 sec would be good I think), pick all units and add the HP that is defined at map init to them.

If they are being attacked, set a boolean variable to true, when the variable is true, the unit won't regenerate.
Ehh... seems easier than doing it with buffs, according to me.
Your idea seems usefull but doing this would be kinda of ...time-consuming and hard i guess.What about this?

When units are attacked just damage them by the amount they regenerate.
for example,if you have a unit to 3 hp rege per 0.25 then
every 0.25 damage it by 3 (add some conditions to check if they are in combat,like check if they take damage.)
 
Level 3
Joined
Jul 3, 2009
Messages
31
Or you can do it the other way around, which might be a bit more daring:

Let nobody have HP regeneration, except when they're not in battle.
It sounds the same, but it isn't ^^

Just set all HP regeneration-things to 0.00, so nobody will regenerate HP and then do it with triggers.
This is not as hard as it may seem, all you need to do is define the unit type and HP regeneration at map init (with variables, in a simple table), then loop a trigger (every .25 sec would be good I think), pick all units and add the HP that is defined at map init to them.

If they are being attacked, set a boolean variable to true, when the variable is true, the unit won't regenerate.
Ehh... seems easier than doing it with buffs, according to me.

Yeap this would work too and is less buggy but wont it be quite laggy if there's too many units? :p

Your idea seems usefull but doing this would be kinda of ...time-consuming and hard i guess.What about this?

When units are attacked just damage them by the amount they regenerate.
for example,if you have a unit to 3 hp rege per 0.25 then
every 0.25 damage it by 3 (add some conditions to check if they are in combat,like check if they take damage.)

its hard to compute for the true hp regen isnt it? =/
 

Dr Super Good

Spell Reviewer
Level 58
Joined
Jan 18, 2005
Messages
26,511
ap0calypse's way is the only accurate way to do this that comes to mind using a perodic trigger.
Simply design a system whereby if the unit is damaged, it is removed from the perodic HP regen group for like 2+ seconds which resets every time it takes damage. Use hashtables to keep track of the units and timers in an "MUI" way.

Further more, who says the units can not regen from abilites. Instead of using triggers to reheal units, you simply add a ring of regeneration ability for rehealing. If the unit is damaged, you remove the ability for 2-3 seconds resetting it every time the unit is damaged. This completly removes the need for a perodic trigger and is much less demanding, however hero units will still need the first method to factor in str regen (unless you have ability systems to do that).
 
Level 27
Joined
Jan 26, 2007
Messages
4,788
I have just made the system... started working on it after my post and here it is, you can test it for yourself if you like.
I hope I haven't done anything wrong, but from the test it seemed all right.

Your idea seems usefull but doing this would be kinda of ...time-consuming and hard i guess.What about this?
Not at all, a bit over 15 minutes of work ^^

Edit: ohh, yeah... you can test the heroes by giving one an insanely high strength (like 2000 or something, as long as you can see his hitpoints), he will regenerate a lot faster.
 

Attachments

  • Regen.w3x
    18.9 KB · Views: 186
Level 27
Joined
Jan 26, 2007
Messages
4,788
15 min work for a test map,what about a "big" map?
Then you would have to edit more units,check more conditions ...etc
Copy/paste my system and you only have 5 minutes of work :/
(All you need to do is CnP the simple table and change the variables).

Creating the entire system took 15 minutes, the simple table is done in almost no-time, multiple conditions? Whatfor if I may ask? ^^
 
Level 27
Joined
Jan 26, 2007
Messages
4,788
I just mentioned it...cause it depends on the map.Might have another problem with your sys.
Well, isn't your system the same?
You damage the units every 0.25 seconds, I heal them every 0.25 seconds ><
Your system also requires to know the amount the unit regenerates, when the unit is attacked, whether he is a hero or not, things like that.
But we're not here to compete, so I'll just stop -.-

You can also decrease the strain by doing it every 0.50 seconds... :/
 
Level 15
Joined
Aug 11, 2009
Messages
1,607
Well, isn't your system the same?
You damage the units every 0.25 seconds, I heal them every 0.25 seconds ><
Your system also requires to know the amount the unit regenerates, when the unit is attacked, whether he is a hero or not, things like that.
But we're not here to compete, so I'll just stop -.-

You can also decrease the strain by doing it every 0.50 seconds... :/

Yeah,i guess you are right.You win :p:xxd:
 
I'm not sure if you can, but can you make it so that when a unit (Most preferably human) is in combat, its HP regeneration freezes, but when it exits combat, it waits X seconds for the HP regen to start again.

I've actually made a system like this before.

what I did was 1 - remove the health regen completely (blizzards system sucks for this) by changing game constances.

then make a trigger that detects when a unit is in combat and sets and integer = + (how ever many seconds you need to wait)
e.g unit is attacked set CombatCounter[Player number] = CombatCounter[Player number] + 5

then create a trigger that is every 1 second (could be 2,3,4 or 5 seconds doesnt matter, just the regen rate)

if then multiple function
if CombatCounter[Player number] is greater than 1
then set CombatCounter[Player number] = CombatCounter[Player number] - 1
else
pick every unit in unit group (what ever group you want I usually use all units)Unit - Set life of (Picked unit) to ((Life of (Picked unit)) + ((Real((Strength of (Picked unit) (Include bonuses)))) x 0.15))

and then your done simple lol
 
Top