• 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.

Trigger help

Status
Not open for further replies.
Level 25
Joined
Feb 9, 2009
Messages
1,800
Basically Ive made a trigger that gives a unit a shield that stops damage and also deals the spilled damage if the units shield life is destroyed,when the unit with this shield is hit with damage over the units maximum health it will die, so i added life gain from the items to give the unit a 1000 hp boost and remove it after the damage had been dealt sadly after the unit is dealt the spilled damage the damage is reduced to 70% and then I'm like wtf?

your opinion is great if you know what your talking about, please if you don't understand ASK.
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,285
You must deal any inflicted yourself. Basically you have to rely on trigger code to set the unit HP to such that it does not die and then after 0 seconds (timer with 0 delay) to such that he has the ammount of HP he should.

In the end you can not rely on the normal damage system from WC3 so you are after canceling out the damage so that no damage can kill the unit and then after the damage is dealt restoring the hitpoint to what they should be. This means you have to store the hitpoints the unit should have, add the HP ability, set its life to max, run your 0 timer, remove the max life ability, and then set their hitpoints to the stored value.
 
Status
Not open for further replies.
Top