I have a reflect ability in my map that is a search area that applies a buff to enemy units with a negative life leach factor. When a unit essentially kills itself on the hero with this spell, the hero who applied the buff does not get credit.
I've tried modifying the Kill Credit field, but that's just changes who gets credit for kills that are made by the unit the buff is currently on. I've tried triggering the kill credit using Event:"unit dies" Condition: "triggering unit has behavior" but I can't find an action to give kill credit to the unit who applied the buff to the enemy. This doesn't even begin to touch on kill xp or money rewards.
Anyone have an idea of something I can try without having to significantly change the ability?
i did the reverse thing, i wantet not to give kill credit for killing a certain unit
have your behavior prevent death, and kill effect on fatal damage with caster source it shhould be possible to redirect it to the caster of the behavior
Your best bet is to use a dummy effect instead of a kill effect for the behavior. You can then detect this dummy effect through triggers (since the behavior prevents death, otherwise behavior disappears upon real death) and then use the trigger "create effect from unit" for another dummy effect that does say 500,000 damage. Of course, you will need a way to determine the "from" unit in the trigger. If there is only one hero per player, that is easy.
I've come up with something that allows me to modify the unit's experience/ minerals when a unit is killed with a reflect ability. Basically, as Karawasa said, I added a Combat: Death Response dummy effect. Then I detected this effect with triggers using the "Effect Used" event. Finally I used Set Property (Experience) and Modify Player Property (Minerals) to update my unit.
The math doesn't work out perfectly as I do not know how to pull up a specific game link through triggers. If anyone else knows what I can change to get the Experience Reward of a unit in the trigger, that would be welcome. For now, my trigger looks like this:
I have a reflect ability in my map that is a search area that applies a buff to enemy units with a negative life leach factor. When a unit essentially kills itself on the hero with this spell, the hero who applied the buff does not get credit.
I've tried modifying the Kill Credit field, but that's just changes who gets credit for kills that are made by the unit the buff is currently on. I've tried triggering the kill credit using Event:"unit dies" Condition: "triggering unit has behavior" but I can't find an action to give kill credit to the unit who applied the buff to the enemy. This doesn't even begin to touch on kill xp or money rewards.
Anyone have an idea of something I can try without having to significantly change the ability?
i did the reverse thing, i wantet not to give kill credit for killing a certain unit
have your behavior prevent death, and kill effect on fatal damage with caster source it shhould be possible to redirect it to the caster of the behavior
It does not appear to have worked. The unit dies with the behavior but I still do not get credit on my hero.
This is the behavior:
and this is the kill effect
I changed launch location to caster here. I'm not sure what else you might have meant by "caster source"
i meant, play around with the launch and or impact location. can't explain it, but it sometime did not work
should be the same like a normal dot behavior with a damage effect.
Your best bet is to use a dummy effect instead of a kill effect for the behavior. You can then detect this dummy effect through triggers (since the behavior prevents death, otherwise behavior disappears upon real death) and then use the trigger "create effect from unit" for another dummy effect that does say 500,000 damage. Of course, you will need a way to determine the "from" unit in the trigger. If there is only one hero per player, that is easy.
I've come up with something that allows me to modify the unit's experience/ minerals when a unit is killed with a reflect ability. Basically, as Karawasa said, I added a Combat: Death Response dummy effect. Then I detected this effect with triggers using the "Effect Used" event. Finally I used Set Property (Experience) and Modify Player Property (Minerals) to update my unit.
The math doesn't work out perfectly as I do not know how to pull up a specific game link through triggers. If anyone else knows what I can change to get the Experience Reward of a unit in the trigger, that would be welcome. For now, my trigger looks like this: