How would I go about getting the caster for a behavior that is on a unit? I need to know this because there could be multiple of the same behavior's on a unit and i want to know how to remove a behavior based on what unit casted it.
Also, how would I make a behavior that in addition to hurting it say every .5 seconds, how would I make that behavior heal the caster also every .5 seconds, I can't find any way to reference the caster for a behavior at all.
I think you can only know wich player casted it with Remove Behavior (Player).
If the units are controlled by the same player you are out of luck probably. Try another approach, but I don't really know what you wanna do.
You can do it by triggers and variables. The skill that puts the buff, does nothing but activating a trigger, that trigger uses a variable and keeps the buff on the target. You can use that variable for knowing the caster, the target, do whatever you want. And you can stop applying the buff whenever you want, with more control over it. But I'll need more info on what you want...
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
How would I go about getting the caster for a behavior that is on a unit? I need to know this because there could be multiple of the same behavior's on a unit and i want to know how to remove a behavior based on what unit casted it.
Also, how would I make a behavior that in addition to hurting it say every .5 seconds, how would I make that behavior heal the caster also every .5 seconds, I can't find any way to reference the caster for a behavior at all.
@LinkD: Go
I think you can only know wich player casted it with Remove Behavior (Player).
If the units are controlled by the same player you are out of luck probably. Try another approach, but I don't really know what you wanna do.
You can do it by triggers and variables. The skill that puts the buff, does nothing but activating a trigger, that trigger uses a variable and keeps the buff on the target. You can use that variable for knowing the caster, the target, do whatever you want. And you can stop applying the buff whenever you want, with more control over it. But I'll need more info on what you want...