I have a seemingly complicated problem I'm encountering with a buff that when applied gives the unit -5 life per second.
The ability is casted by a unit, and used on an enemy unit. There are two problems I am encountering.
1. This health degeneration has the potential to kill the unit, when this happens the caster does not get the Kill Credit, which means they miss out on the experience for killing the unit. I have played with the Kill Credit flag in the behavior as well as the Source/Caster and Target/Unit and have not been able to get the desired result.
2. I would like this buff to be passed on to nearby units, so, for example, Player 1 casts this with unit A on player 2's unit B. Player 2 also happens to have units C and D within range of B, so I would like the buff to pass to them. To do this I have created a periodic effect on the buff which calls a search area effect which in turn applies the buff to the nearby units. So ideally the buff will keep being reapplied until the units spread out. This is also not working. I have played with the search filters as well as the Source/Target and was not able to get the desired outcome. And, now I'm realizing if those further units died due to the effect, how do I get unit A to get the credit for it?
1. This health degeneration has the potential to kill the unit, when this happens the caster does not get the Kill Credit, which means they miss out on the experience for killing the unit. I have played with the Kill Credit flag in the behavior as well as the Source/Caster and Target/Unit and have not been able to get the desired result.
SC2 Melee got away with that because kill credit was not important. You need to use a "damage" effect and actually deal 5 damage to the unit and not remove 5 life from it. You can enable various damage flags to bypass armor and even damage event responses. Since the caster is dealing damage to the target it should then correctly credit kills.
This assumes that source and target are already correctly set and it is not working. Make sure that from the buff the effect's source is the buff caster (unit dealing damage) and not the unit with the buff (suicide kill).
If the buff is self-applied then you can stop it killing the unit by applying a validator to the buff that disables it when less than 6 life.
Quote:
2. I would like this buff to be passed on to nearby units, so, for example, Player 1 casts this with unit A on player 2's unit B. Player 2 also happens to have units C and D within range of B, so I would like the buff to pass to them. To do this I have created a periodic effect on the buff which calls a search area effect which in turn applies the buff to the nearby units. So ideally the buff will keep being reapplied until the units spread out. This is also not working. I have played with the search filters as well as the Source/Target and was not able to get the desired outcome. And, now I'm realizing if those further units died due to the effect, how do I get unit A to get the credit for it?
You need to make sure that all units being damage by it have the damage source as the original caster. Specifically when applying the buff to new units from the buff periodic effect you need to make sure that the source is the original casting unit (the one who created the buff) and not the buff owner (unit with the buff). As long as all buffs come from the original caster it should credit them correctly.
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
I have a seemingly complicated problem I'm encountering with a buff that when applied gives the unit -5 life per second.
The ability is casted by a unit, and used on an enemy unit. There are two problems I am encountering.
1. This health degeneration has the potential to kill the unit, when this happens the caster does not get the Kill Credit, which means they miss out on the experience for killing the unit. I have played with the Kill Credit flag in the behavior as well as the Source/Caster and Target/Unit and have not been able to get the desired result.
2. I would like this buff to be passed on to nearby units, so, for example, Player 1 casts this with unit A on player 2's unit B. Player 2 also happens to have units C and D within range of B, so I would like the buff to pass to them. To do this I have created a periodic effect on the buff which calls a search area effect which in turn applies the buff to the nearby units. So ideally the buff will keep being reapplied until the units spread out. This is also not working. I have played with the search filters as well as the Source/Target and was not able to get the desired outcome. And, now I'm realizing if those further units died due to the effect, how do I get unit A to get the credit for it?
Any help on this would be greatly appreciated
SC2 Melee got away with that because kill credit was not important. You need to use a "damage" effect and actually deal 5 damage to the unit and not remove 5 life from it. You can enable various damage flags to bypass armor and even damage event responses. Since the caster is dealing damage to the target it should then correctly credit kills.
This assumes that source and target are already correctly set and it is not working. Make sure that from the buff the effect's source is the buff caster (unit dealing damage) and not the unit with the buff (suicide kill).
If the buff is self-applied then you can stop it killing the unit by applying a validator to the buff that disables it when less than 6 life.
You need to make sure that all units being damage by it have the damage source as the original caster. Specifically when applying the buff to new units from the buff periodic effect you need to make sure that the source is the original casting unit (the one who created the buff) and not the buff owner (unit with the buff). As long as all buffs come from the original caster it should credit them correctly.