I've read a couple of tutorials on this forum regarding the creation of a poison effect.
I've ended up creating a behavior buff that gets applied periodically. In the buff modifications + tab I've changed under Unit the life regeneration to -10 which will remove 10 life from the unit. This all works great. Except, now I have an issue with my trigger editor where I have to count the kills a player get.
I use Killing Player to get the player number of the player who Killed a unit and set it for an action Any Unit dies. Which all works great. Except if a unit dies from the poison behavior :( For some strange reason, Killing Player returns 16 when the unit dies from the Poison Behavior. If the tower kills the unit it works, but let's say the unit moves out of range of the tower but is still affected by the poison behavior and it dies because of it, the killing player is suddenly 16 and not the player who initially cast the behavior.
Any ideas on how to fix this so that the killing player is picked up as the actual player who cast the behavior on the creep?
Instead of reducing health regeneration, making a damage effect occur for the periodical effect of the behaviour would solve this and some other potential issues that could occur (e.g. bypassing shields).
Imagine this buff on an Archon compared to a Zergling. It would actually kill the Archon (350 shields and 10 health) before it would kill a Zergling (35 health) if applied at the same time.
If you do not want the target regenerating their health either, it can be disabled within the modification section of the behaviour.
You were both spot on! This works perfectly! Any ideas on how I could every time the damage gets dealt (in this case every 2 seconds it does 25 damage to the unit) to display a text tag above the unit taking damage showing -25? Is that possible?
Create a Behavior of type 'Buff' and name it "Poison".
Create an Effect of type 'Damage' and name it 'Poison Damage'. Locate "Combat - Amount" and set it to '10'.
Go back to the Behavior ("Poison"). Locate "Stats - Period" and set it to '1' (or the interval at which you want to inflict the damage from the poison). Locate "Effect - Effect - Periodic" and link the effect you created ("Poison Damage").
Now the behavior will inflict 10 (proper) damage every 1 second. If you apply to it a unit from another unit or player, the kills will given to the casting unit/player.
Rollback Post to RevisionRollBack
"I reject to reality and substitude my own." - Adam Savage, Mythbusters