A passive ability where whenever the unit with the ability/buff takes damage and has X charges saved, it will cast an effect on the unit attacking it.
So to clarify if thats not clear, say a ghost has this buff, when a zergling attacks the ghost, the ghost will be able to continue firing like normal while this ability does the extra damage back. Each time it is cast it will use up a charge that regenerates.
I know how to get the charges working on active abilities. But I haven't been able to figure out a way to make an ability happen when a unit takes damage other than through triggers.
To cast an effect, when a unit takes damage, use the Damage Response for a behavior, especially the Handled - field, which executes an effect whenever damage is handled.
If your location is set to Defender (so it triggers when a unit takes damage), the Source of the executed effect will be the unit taking damage and the Target will be the unit causing the damage.
However I tried to set up the charge counters and that led to problems.
First I tried doing the charges all through damage response. I set a max of 6, start of 3, and cost of 1. Set the time use to 5. So it appeared to work (though it didn't show the charge count on the ability).
Since it didn't show I tried with ability itself, and those don't really work the way a passive ability needs to.
Is there a reason its not showing the charge counters on the ability when its through damage response?
Also is there an effective way to reapply the buff after X time through the ability? Right now I have to activate the ability to apply the buff. So not sure what I'm fully doing wrong there. The way it should work is whenever it has active charges the buff is applied, and when it doesn't it would be removed.
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
A passive ability where whenever the unit with the ability/buff takes damage and has X charges saved, it will cast an effect on the unit attacking it.
So to clarify if thats not clear, say a ghost has this buff, when a zergling attacks the ghost, the ghost will be able to continue firing like normal while this ability does the extra damage back. Each time it is cast it will use up a charge that regenerates.
I know how to get the charges working on active abilities. But I haven't been able to figure out a way to make an ability happen when a unit takes damage other than through triggers.
Should be possible.
To cast an effect, when a unit takes damage, use the Damage Response for a behavior, especially the Handled - field, which executes an effect whenever damage is handled.
If your location is set to Defender (so it triggers when a unit takes damage), the Source of the executed effect will be the unit taking damage and the Target will be the unit causing the damage.
@Kueken531: Go
Awesome I got the return damage working.
However I tried to set up the charge counters and that led to problems. First I tried doing the charges all through damage response. I set a max of 6, start of 3, and cost of 1. Set the time use to 5. So it appeared to work (though it didn't show the charge count on the ability).
Since it didn't show I tried with ability itself, and those don't really work the way a passive ability needs to.
Is there a reason its not showing the charge counters on the ability when its through damage response?
Also is there an effective way to reapply the buff after X time through the ability? Right now I have to activate the ability to apply the buff. So not sure what I'm fully doing wrong there. The way it should work is whenever it has active charges the buff is applied, and when it doesn't it would be removed.