Ashcat
Hellooo
- Reaction score
- 68
Hi everyone, I'm creating a spell that absorbs all the damage you take for a short duration, then unleashes it all on your next attack. I have everything down, except one small issue I've noticed.
What I'm doing, is I am detecting when a unit with the spell activated is damaged, then increasing the life of the damaged unit by the amount of damage taken.
The problem is that if the damage taken is greater than the amount of health that the damaged unit has at the moment, then it will die before the triggers can increase its health.
And I can't use item spells or anything like Hardened Skin, or Spiked Carpace, because I need to be able to store the amount of damage taken in a variable.
What I'm doing, is I am detecting when a unit with the spell activated is damaged, then increasing the life of the damaged unit by the amount of damage taken.
The problem is that if the damage taken is greater than the amount of health that the damaged unit has at the moment, then it will die before the triggers can increase its health.
And I can't use item spells or anything like Hardened Skin, or Spiked Carpace, because I need to be able to store the amount of damage taken in a variable.