• 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.
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!
  • ✅ The POLL for Hive's Texturing Contest #34 is OPEN! Vote for the TOP 3 SKINS! 🔗Click here to cast your vote!
  • ✅ The POLL for Hive's Techtree Contest #20 is OPEN! Vote for the TOP 3 FACTIONS! 🔗Click here to cast your vote!

[Spell] how to absorm incoming heal

Status
Not open for further replies.
Level 9
Joined
Jun 13, 2008
Messages
362
I was wondering if wc3 lets us to complately disable hp regeneration(no matter how many regen items the target has or skills) and also absorm heal?...I mean, when the target has a specific debuff, it cannot be healed by any means....when I holy light him, life is not gonna increase etc.

an example spell from WoW:
http://www.wowhead.com/spell=73975

I searched but couldn't find any system for this and I guess its impossible except doing this one by one for each heal spell/item like attack damage detection system does(calculates) for each one.

comments and thoughts are appreciated.
 
Ezekiel12's method above is what I'd also suggest. To have it only absorb a set amount of healing:

In the loop trigger, compare the unit's current health to the saved variable, and add that difference to another variable. Which this second variable reaches X amount, you can remove the buff.

So if we have
real HealthSet (what the unit's health was at cast)
real HealAbsorbed (how much healing total has been absorbed)

Do
If (Current Health of unit greater than HealthSet)
Then (Set difference = current health of unit - HealthSet)
Unit - Set life of unit to HealthSet
Set HealAbsorbed = HealAbsorbed + difference
 
Its not that simple, if the unit gets healed right after taking damage the heal will not be absorbed (at least not all of it).
Peroidic approaches to those things are always a bit exhausting to code because you have to take care of lots of things.
 
according what you say muzzel, I guess I can say that it really should be a deep considered thing, so a system?

Its odd why this type of system was never made for wc3. If only heal would be a specific type/class in wc3, it would be much easer to accomplish. but dont know how yet, I wanna do this anyhow.
 
Running a 0.00 second timer after a damage event will lead to the unit actually having suffered the damage while not even one game frame will have passed. When the timer runs out set your variable to the current life of the unit.

This is the most straightforward way, everything else requires a lot more triggers.
 
I'd suggest you another way. Save the amount that should be absorbed in avariable and chech through all healings spells that can be cast. Put unit begins castin an ability and if the amount is more than order casting unit to stop. This does nto detect accurate number of healing but at least you can calculate the heals and when the variable reaches the limit remove the buff for absorbing from that unit :thumbs_up:
 
I did it guys thanks for your advices...its not that effective or professional as I hoped it to be but still works.
 
absorm heal
What is to absorm something?!
Did you mean absorb?
The only solution I can think of is to periodically poll the unit health and measure any increase made to it and register that increase as a heal and possibly lower health back to a certain amount. You also need to keep track of damage received so that you cannot falsely ignore a heal due to it counter acting some damage between polls. You also need to be tolerant to damage sources that do not deal damage but drain health (negative healing well, plague from abominations, inverse heals etc) however you will unfortunately allow for some of these to be counter acted by heals as there is no way to detect them if the unit has just been healed for a large amount.
 
Simply trigger life regeneration with triggers instead of using the object editor regen.
Then custom code your healing abilites using dummy abilites that only allow targeting the unit but doesn't heal it. Then check if the unit has the buff when a healing ability is cast on it, if he DOESN'T then apply your healing effect.
 
Status
Not open for further replies.
Back
Top