I've created the aura and got everything setup but I can't figure out how to return a % of the damage received back on the attacker. I have a damage response setup where it deals damage back, but I don't know how to call the % of the damage received.
The only way I know of to do this data-only is by using negative life-steal, however this has some problems with the kill credit n such. I would probably use triggers instead, should be fairly easy.
Taru-ReflectionAuraEffectEventsUnit-AnyUnittakesFatalorNon-FatalAnydamage(fromAnyeffects)LocalVariablesDamageAmount=0.0<Real>Conditions((Triggeringunit)hasTaru-ReflectionAura(Buff))==TrueActionsVariable-SetDamageAmount=(Triggeringdamageamount)General-If(Conditions)thendo(Actions)elsedo(Actions)IfReflectionAuraLevel[1] == True
Then
Variable - Set Damage Amount = (Damage Amount * 0.11)
Unit - Set (Damaging unit) Life to (((Damaging unit) Life (Current)) - Damage Amount)
What am I doing wrong here? It's returning 3 damage regardless of the amount. It's not doing 11%
The 2nd function is correct. It uses a damage effect for all the specifications (like death type, potentially related actors etc etc), but you can add the damage amount via trigger.
As for finding the bug, print out text messages, which show the calculated numbers for every step.
I'm now trying to get a effect to be displayed upon the damage return.
I want a effect displayed with the damage, but I can't seem to get it to work. I know how to manipulate unit birth events and missiles, but I am at a loss here.
I want a effect displayed with the damage, but I can't seem to get it to work. I know how to manipulate unit birth events and missiles, but I am at a loss here.
I'm sure this is really simple, but I just can't get it to work with this ability. Help plz
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
I've created the aura and got everything setup but I can't figure out how to return a % of the damage received back on the attacker. I have a damage response setup where it deals damage back, but I don't know how to call the % of the damage received.
Can this be done?
The only way I know of to do this data-only is by using negative life-steal, however this has some problems with the kill credit n such. I would probably use triggers instead, should be fairly easy.
@Kueken531: Go
What am I doing wrong here? It's returning 3 damage regardless of the amount. It's not doing 11%
I would use the UnitDamage function instead of setting the unit's life. But still, your calculation looks correct and should work.
@Kueken531: Go
These are the only two I could find. Is it one of these that you use?
I agree that mine should be working, but it's not. Something is wrong with the percentage count.
Just added
To test it and it's returning 2 or 3 so something is wrong.
The 2nd function is correct. It uses a damage effect for all the specifications (like death type, potentially related actors etc etc), but you can add the damage amount via trigger.
As for finding the bug, print out text messages, which show the calculated numbers for every step.
@Kueken531: Go
I'll post a thread in the trigger section and see if someone can figure out why it's not returning 11%.
www.sc2mapster.com/forums/development/triggers/33407-not-working-right/
I'm now trying to get a effect to be displayed upon the damage return.
I want a effect displayed with the damage, but I can't seem to get it to work. I know how to manipulate unit birth events and missiles, but I am at a loss here.
I'm sure this is really simple, but I just can't get it to work with this ability. Help plz