Sorry for asking so many questions lately (sigh), but I just can't figure this one out. I have a behavior on a unit with a Death Response that should be applying another behavior to the unit that struck the killing blow, but it's just not working. Should i be using a Fatal damage response instead or something?
Ok i've been playing around with this one for a bit now... I'm pretty sure I'm having a brain fart, but this is what i've got so far.
As far as I know there is no validator for "unit just killed a unit" or something similar (However i might be missing something). Its simple enough to apply a behavior when a unit does. You're correct in using Death Response -> search area -> apply behavior. However it applies a behavior to all units in the area. I fiddled with this for a bit and got it to the point where it could apply the behavior to any unit that was casting an ability or attacking the dying unit. The end result was bugged if you had more than 1 unit attacking the dying unit, they both would end up with the behavior.
So in a work around attempt I was able to add a validator to the apply behavior effect to the attacking units weapon (you'll also have to do this for each of his abilities) which would apply the behavior to the attacking unit if its targets health was zero, aka dead. This actually worked perfectly. If you wanted this killing blow behavior to be applied only when specific units are killed or when a unit with specific behavior is killed then you could then combine this with a 2nd validator of "dying unit has behavior".
The only draw back to this way is that you have to create a set effect that combines the damage and the apply behavior - Killing Blow effect for EVERY damaging ability/weapon of the killing unit. There might be other ways to do this, but as of right now I'm thinking this is the least buggy.
This 5 hour energy sure is messing with my focus, lol.
I upload the map I worked at it on. Look at the ghosts weapon and the effects/behaviors I attached to it. I apologize for everything being poorly named, I wasn't planning on saving this and it was only for my use.
To explain:
1. Create a behavior that you want applied to the killing unit when it gets a killing blow. (should only to do this once since you can reuse this with every damaging ability/weapon)
2. Create an apply behavior effect that applies the behavior above (same as step 1, only need to do this once)
3. Duplicate an existing validator or create your own (type Unit Compare Vital) and set it "less than or equal to" and the value to zero. In my map its called "Target Life 0" feel free to copy paste it over. Add this validator to the APPLY BEHAVIOR validator field in step 2. (You guessed it will only have to do this once)
4.Create a Set effect for every damaging effect (weapons, abilities, ect). Now this is will have to be done for EVERY damaging effect.
5. Link the abilities/weapons original damaging effect and the apply behavior effect to the Set effect you created in step 4.
6. Link the Set effect to wherever the original damage effect was.
7. Test and be amazed!
Summary: Steps 1 through 3 will only have to be done once and then linked to every damaging ability/weapon after that. Step 4 and on will have to be done for everything...
Well, that's a little more work than i would be expecting to do. Maybe i'll ditch this ability idea till I can figure out how to do it from a single behavior :P
i Think you can also just use caster as target in the effect triggert by the dmg response - the one who applyed the said debuff is also the caster of the debuff - so if you refer to Target: Caster in the effect triggert by the deathresponse you should be able to apply use an apply behavior effect - or whatever you want really - just use Caster as target in the Effect
i use it to replenish energy on Killing blows
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
Sorry for asking so many questions lately (sigh), but I just can't figure this one out. I have a behavior on a unit with a Death Response that should be applying another behavior to the unit that struck the killing blow, but it's just not working. Should i be using a Fatal damage response instead or something?
@RCIX: Go
Ok i've been playing around with this one for a bit now... I'm pretty sure I'm having a brain fart, but this is what i've got so far.
As far as I know there is no validator for "unit just killed a unit" or something similar (However i might be missing something). Its simple enough to apply a behavior when a unit does. You're correct in using Death Response -> search area -> apply behavior. However it applies a behavior to all units in the area. I fiddled with this for a bit and got it to the point where it could apply the behavior to any unit that was casting an ability or attacking the dying unit. The end result was bugged if you had more than 1 unit attacking the dying unit, they both would end up with the behavior.
So in a work around attempt I was able to add a validator to the apply behavior effect to the attacking units weapon (you'll also have to do this for each of his abilities) which would apply the behavior to the attacking unit if its targets health was zero, aka dead. This actually worked perfectly. If you wanted this killing blow behavior to be applied only when specific units are killed or when a unit with specific behavior is killed then you could then combine this with a 2nd validator of "dying unit has behavior".
The only draw back to this way is that you have to create a set effect that combines the damage and the apply behavior - Killing Blow effect for EVERY damaging ability/weapon of the killing unit. There might be other ways to do this, but as of right now I'm thinking this is the least buggy.
This 5 hour energy sure is messing with my focus, lol.
Well, I'd actually be happy with applying an effect to any unit that was attacking it on death. How did you get that?
@RCIX: Go
I upload the map I worked at it on. Look at the ghosts weapon and the effects/behaviors I attached to it. I apologize for everything being poorly named, I wasn't planning on saving this and it was only for my use.
To explain:
1. Create a behavior that you want applied to the killing unit when it gets a killing blow. (should only to do this once since you can reuse this with every damaging ability/weapon)
2. Create an apply behavior effect that applies the behavior above (same as step 1, only need to do this once)
3. Duplicate an existing validator or create your own (type Unit Compare Vital) and set it "less than or equal to" and the value to zero. In my map its called "Target Life 0" feel free to copy paste it over. Add this validator to the APPLY BEHAVIOR validator field in step 2. (You guessed it will only have to do this once)
4.Create a Set effect for every damaging effect (weapons, abilities, ect). Now this is will have to be done for EVERY damaging effect.
5. Link the abilities/weapons original damaging effect and the apply behavior effect to the Set effect you created in step 4.
6. Link the Set effect to wherever the original damage effect was.
7. Test and be amazed!
Summary: Steps 1 through 3 will only have to be done once and then linked to every damaging ability/weapon after that. Step 4 and on will have to be done for everything...
Well, that's a little more work than i would be expecting to do. Maybe i'll ditch this ability idea till I can figure out how to do it from a single behavior :P
i Think you can also just use caster as target in the effect triggert by the dmg response - the one who applyed the said debuff is also the caster of the debuff - so if you refer to Target: Caster in the effect triggert by the deathresponse you should be able to apply use an apply behavior effect - or whatever you want really - just use Caster as target in the Effect
i use it to replenish energy on Killing blows