So I've created a buff for one of my heroes that gives him some leech. The problem is that if he kills another unit the leech doesn't trigger. For example he can one shot zerglings, and when he does he gains no health or shields back. Is there a way around this? Right now I basically created a buff based on the stimpack. Gave it a cd, removed the health cost, and added the leech (and modified how much the speed changes from 1.5/1.9 to 1.8/1.8) ... any insight would be helpful.
I think that accure because the dying is happen before life steal, I suggest to use the damage effect life steal option instead. I tested it if an ability or weapon uses damage with life steal it is work even if target dies. You would like to creat a buff that gives the life steal, It can be done but have a little bit work depend on how many weapons and abilities you use. You need to creat a set effect and an alternative damage effect that damage the same amount as normal damage does, for every weapon and ability you use. Search the effect field on weapon or ability, put here the set effect instead of the damage(if the ability or weapon is ranged and have launch missile effect you must put the set effect in launch missile effect instead of weapon or ability, and than switch to effects tag, search for this set effect and put the 2 damage effect to its effects. After this you can creat 2 unit compare behavior count type validators on validator tags, the normal damage validor should be your life steal buff = 0, and the alternative damage validator should your life steal buff=1. This cause that if your unit has tha life steal behavior then alternative damage will execute, if dont the normal damage will.
Important: I mentioned that if weapon or ability uses a launch missile effect,you must change the damage effect to set effect inside it, there are lot other effect that can execute damage effects, the goal is that if you decide to use my suggestion you must always change the damage effect to set with 2 damage inside it,if you would like to give a life steal to it.
It's just normal zealot attacks ... so if I understand this right what you're saying is that I need to make a second weapon that has the lifesteal built in? then use a validator to check if the unit has the buff, and if it does use the leech weapon effect instead of the normal weapon effect? Is that right?
Zealot weapon is the best example to demonstrate because it has and effect that holds the damage effect,:
Zealot has weapon: Psi blades
Psi blades have 2 effect: Psi blades and Psi blades damage
the Psi blades is a creat persistent that sets to Psi blades damage hits twice, in a short time period, it is required because zealot attack animation also hits twice
This creat persistant effects have the Psi blade damage,
1 So you make Set type Effect name it for example Psi Blade Damage Set. put these set effect inside the Psi blades (creat persistent) instead of Psi Blade Damage.
2 Duplicate the Psi Blade Damage. name the duplicated one to Psi Blade Damage Alternate and set the life steal amount inside this effect .
3 put the Psi Blades Damage and Psi Blade Damage Alternate inside the Psi Blade Set.
4 creat 2 Unit compare behavior count type validators name one of them to "your buff name" on and the other to "your buff name" off
5 Set the on validator to "your buff name" equal to 0 and the off validator to "your buff name" equal to 1(or greater then 0)
6. Put the off validator to Psi Blade Damage and put the on validator to Psi Blade Damage Alternate
So I've created a buff for one of my heroes that gives him some leech. The problem is that if he kills another unit the leech doesn't trigger. For example he can one shot zerglings, and when he does he gains no health or shields back. Is there a way around this? Right now I basically created a buff based on the stimpack. Gave it a cd, removed the health cost, and added the leech (and modified how much the speed changes from 1.5/1.9 to 1.8/1.8) ... any insight would be helpful.
@3yks: Go
I think that accure because the dying is happen before life steal, I suggest to use the damage effect life steal option instead. I tested it if an ability or weapon uses damage with life steal it is work even if target dies. You would like to creat a buff that gives the life steal, It can be done but have a little bit work depend on how many weapons and abilities you use. You need to creat a set effect and an alternative damage effect that damage the same amount as normal damage does, for every weapon and ability you use. Search the effect field on weapon or ability, put here the set effect instead of the damage(if the ability or weapon is ranged and have launch missile effect you must put the set effect in launch missile effect instead of weapon or ability, and than switch to effects tag, search for this set effect and put the 2 damage effect to its effects. After this you can creat 2 unit compare behavior count type validators on validator tags, the normal damage validor should be your life steal buff = 0, and the alternative damage validator should your life steal buff=1. This cause that if your unit has tha life steal behavior then alternative damage will execute, if dont the normal damage will.
Important: I mentioned that if weapon or ability uses a launch missile effect,you must change the damage effect to set effect inside it, there are lot other effect that can execute damage effects, the goal is that if you decide to use my suggestion you must always change the damage effect to set with 2 damage inside it,if you would like to give a life steal to it.
It's just normal zealot attacks ... so if I understand this right what you're saying is that I need to make a second weapon that has the lifesteal built in? then use a validator to check if the unit has the buff, and if it does use the leech weapon effect instead of the normal weapon effect? Is that right?
@3yks: Go
Zealot weapon is the best example to demonstrate because it has and effect that holds the damage effect,:
Zealot has weapon: Psi blades
Psi blades have 2 effect: Psi blades and Psi blades damage
the Psi blades is a creat persistent that sets to Psi blades damage hits twice, in a short time period, it is required because zealot attack animation also hits twice
This creat persistant effects have the Psi blade damage,
1 So you make Set type Effect name it for example Psi Blade Damage Set. put these set effect inside the Psi blades (creat persistent) instead of Psi Blade Damage.
2 Duplicate the Psi Blade Damage. name the duplicated one to Psi Blade Damage Alternate and set the life steal amount inside this effect .
3 put the Psi Blades Damage and Psi Blade Damage Alternate inside the Psi Blade Set.
4 creat 2 Unit compare behavior count type validators name one of them to "your buff name" on and the other to "your buff name" off
5 Set the on validator to "your buff name" equal to 0 and the off validator to "your buff name" equal to 1(or greater then 0)
6. Put the off validator to Psi Blade Damage and put the on validator to Psi Blade Damage Alternate