• 🏆 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!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

Simulate a Unit being healed Event

Status
Not open for further replies.
Level 2
Joined
Feb 17, 2017
Messages
26
Hi,

So I had this idea of creating a nice alchemist that would have an aura based on the Death Knight's Unholy Aura called Healing Mist.

Basically what I want it to do is to heal the nearby units over time, just like the Unholy Aura, so far so good, just copy the ability and it's done.

But now I wanted it to give an extra effect, instead of giving a speed bonus, I want it to give a heal bonus, so when targets under the aura's buff are being healed, the healing spells become more effective (For example when a priest uses the spell Heal on a unit under the aura's effect, instead of healing 50 HP the unit is healed 100 HP when the aura is at lvl 3)

I was hoping I'd find a "Unit being healed" event in the WE but no luck... So now I'm fidgeting around with variables trying to simulate such an event, but don't know what could possibly be the right triggers for this.

Thanks in advance for your help.
 
Level 2
Joined
Feb 17, 2017
Messages
26
Actually I was thinking of something more general, applying to ANY healing ability, even new custom ones. I was indeed thinking about using these 2 events, but I have a problem with this, because I would apparently need to save all healing spells that I have in mind, and that is not what I would like to do.

My plan was to create a trigger that would do something like this:

Event:
A unit starts the effect of an ability
Conditions:
Target unit is under the effect of the buff
Actions:
- Save current amount of the target unit before the ability is being cast in a real variable
- Compare this value with the HP of the target unit after the ability has been cast
- Set If/Then/Else Action
- If the second value is higher, the target unit was therefore hit by a healing spell, so add some maths in the actions to increase the healing
- Else, if second value is lower or equal to the variable, do nothing

So that's pretty much the theory of how I would do it, looks easy to do but I'm stuck with acquiring the target's second amount of health after the ability has been cast, I have no idea how to.
 
Level 17
Joined
Mar 21, 2011
Messages
1,611
There are 2 solutions for this. First one would be to implement a Damage Detection System into your map, and trigger all your heal effects. Then you can easily modify it on an OnDamage Event. The other solution would be to detect hitpoint gain in general. you can periodically check for a units' hp. and whenever the unit gained hp, you can double the value. downsides: it includes all kinds of healing, even the basic hp regen. / it is a periodic trigger that has to run for multiple units, so its not that great performance wise / it might also be a bit inaccurate
 
The other solution would be to detect hitpoint gain in general. you can periodically check for a units' hp. and whenever the unit gained hp, you can double the value. downsides: it includes all kinds of healing, even the basic hp regen. / it is a periodic trigger that has to run for multiple units, so its not that great performance wise / it might also be a bit inaccurate
Bribe made an "heal" Event which works kinda like what you described. It can be found inside spell section.

Edit:
First one would be to implement a Damage Detection System into your map, and trigger all your heal effects
If one creates all healing spells/effects one is better off creating the heal Event with "game real becomes value".
 
Last edited:
Status
Not open for further replies.
Top