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!
you need a damage detection even if it has fixed amount of damage because if the target has less HP left than damage would be dealt the caster would be healed more than the amount it should be healed.
^ this guy was right. U must calculate how much the damage doneto the target to heal the caster. But if the damage is pure (mean it goes through everything), I can help u to do this spell without a damage engine.
you need a damage detection even if it has fixed amount of damage because if the target has less HP left than damage would be dealt the caster would be healed more than the amount it should be healed.
Not only in this specific case would you leech more life, than you should, but considering resistances, you would do very frequently (except of course you would use pure damage ^). To avoid this, a damage detection system is not necessary. You would only need to store the individual resistances of every unit in your map. Also, if you don't modify any resistances, while the map is running, you can instead store the resistances of every unit type that appears in your map. Given, you don't use a whole lot of different unit types, this could be easier.
Couldnt you do something like this? (This trigger is probably not leak free or MUI but I just meant the life before/after concept) If you set a small casting time at like 0.04 or 0.1 or something. Im just speculating.
Finger of Death
Events
Unit - A unit Begins casting an ability
Conditions
(Ability being cast) Equal to Finger of Death (Archimonde)
Actions
Set Healthbefore = (Life of (Target unit of ability being cast))
Wait 0.10 seconds
Set HealthAfter = (Life of (Target unit of ability being cast))
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
((Target unit of ability being cast) is alive) Equal to True
Then - Actions
Unit - Set life of (Triggering unit) to ((Life of (Triggering unit)) + (Healthbefore - HealthAfter))
Else - Actions
Unit - Set life of (Triggering unit) to ((Life of (Triggering unit)) + Healthbefore)
If you cast a damage ability on a unit (let's say it deals 200 dmg) and this unit loses 150 hp as a result of the casting of the spell, wouldn't you say, the spell has dealt 150 damage? (at least that's what i would say, but ofc i may be wrong...)
A tooltip in most cases only depicts the most basic event to happen, when cast. For instance, if you look at standard w3 abilities like stormbolt, the tooltip says "stuns the target for 5 seconds", but if cast on a hero, it will last for 3 seconds. (i know, what he said, wasn't a tooltip, but i think the terminology should remain the same)
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.