Hey guys! I've done something like this before, a while ago though, but for some reason I can't get it to work again.
Basically, my unit has an ability that costs 1 Energy. If that ability kills an enemy, it will refund or regenerate 1 Energy. I also want his melee attack to refund regenerate 1 Energy too. I've done a Behavior that Handled the custom Effect I made to modify the value of his Energy by 1, but to no avail.
are you sure it is checking for the damage on the target rather than the owner? and are you sure the energy on kill effect is being applied to the owner? try replacing the effect with something visible like psi storm (persistent), and both kill an enemy, and let your unit die.
I have set literally as many things as possible to check I killed the enemy unit. Under the damage response, it's set to attacker, and I've even turned on Kill Credit effect. I have let my unit die and I've killed multiple enemies, however, I'm not getting Energy back from anything.
What do you mean replace the effect with something visible? Can you clarify? I'm using a Modify Unit effect which I've used plenty of times, but it doesn't seem to budge whenever I hook it up with a Behavior.
If you want the caster to regen energy when his target dies, I believe you'd put the modify unit effect in the "Death Response" behavior field, rather than damage response. Hope that helps.
I mean temp replace the restore energy effect with psi storm persistent so that you can see if the effect even goes off, and where, and from what unit.
Hey guys! I've done something like this before, a while ago though, but for some reason I can't get it to work again.
Basically, my unit has an ability that costs 1 Energy. If that ability kills an enemy, it will refund or regenerate 1 Energy. I also want his melee attack to refund regenerate 1 Energy too. I've done a Behavior that Handled the custom Effect I made to modify the value of his Energy by 1, but to no avail.
Behavior -> Damage Response+; Chance 1; Fatal Enabled; Handled "EnergyOnKIll" effect
Effect (Modify Unit) -> Vitals; Energy +1
I've tampered around with this but nothing has worked. I may be missing something pretty obvious here... I got a feeling.
Thanks in advance.
are you sure it is checking for the damage on the target rather than the owner? and are you sure the energy on kill effect is being applied to the owner? try replacing the effect with something visible like psi storm (persistent), and both kill an enemy, and let your unit die.
@Ranakastrasz: Go
I have set literally as many things as possible to check I killed the enemy unit. Under the damage response, it's set to attacker, and I've even turned on Kill Credit effect. I have let my unit die and I've killed multiple enemies, however, I'm not getting Energy back from anything.
What do you mean replace the effect with something visible? Can you clarify? I'm using a Modify Unit effect which I've used plenty of times, but it doesn't seem to budge whenever I hook it up with a Behavior.
If you want the caster to regen energy when his target dies, I believe you'd put the modify unit effect in the "Death Response" behavior field, rather than damage response. Hope that helps.
I mean temp replace the restore energy effect with psi storm persistent so that you can see if the effect even goes off, and where, and from what unit.
Set max energy to be whatever you want, set regen rate to be zero, and I think you can set up a trigger to give how much energy to the killing unit.
@Nahotnoj: Go
If all else fails, trigger it.
I doubt you will need triggers for this.
Is the Unit - Transfer Unit - Value or Target - Impact Unit - Value set to target for your Modify Unit effect?
Contribute to the wiki (Wiki button at top of page) Considered easy altering of the unit textures?
https://www.sc2mapster.com/forums/resources/tutorials/179654-data-actor-events-message-texture-select-by-id
https://media.forgecdn.net/attachments/187/40/Screenshot2011-04-17_09_16_21.jpg