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?
Lane Runner if you dare.
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
A programmer started to cuss
Because getting to sleep was a fuss
As he lay in his bed
Looping 'round in his head
Was: while (!asleep()) sheep++;
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:
Field Elarae - Reflect Behavior 0
Behavior: Alignment Negative
Behavior: Name Reflect Behavior 0
Combat: Damage Response - Chance 1
Combat: Damage Response - Fatal Enabled
Combat: Damage Response - Handled Kill (Caster) (Generic Kill Command)
Combat: Damage Response - Modify Fraction 0
Combat: Modification - Vital Leeched from Damage Dealt - Damage Kind ((-0.25|-0.25|-0.25|-0.25)|(0|0|0|0)|(0|0|0|0))
Editor: Editor Categories AbilityorEffectType:Units
Editor: Editor Description
Editor: Editor Prefix Elarae -
Editor: Editor Suffix
Stats: Duration 0.3500
Stats: Flags Hidden
and this is the kill effect
Field Kill (Caster) (Generic Kill Command)
Editor: Editor Categories Race:Terran
Editor: Editor Description
Editor: Editor Name Kill (Caster)
Editor: Editor Prefix
Editor: Editor Suffix (Generic Kill Command)
Effect: Flags Kill, Notification
Effect: Response Flags Acquire, Flee
Search: Search Flags Call For Help, Same Cliff Level
Target: Launch Location - Value Caster Unit)
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:
Environment - Player (Owner of Elarae) uses Effect Elarae - Reflect Kill (Dummy)
Player - Modify player (Owner of Elarae) Minerals: Add (Minerals cost of (Triggering Effect Unit Type(Target)))
Unit - Set Elarae Experience to ((Elarae Experience (Current)) + ((Minerals cost of (Triggering Effect Unit Type(Target))) * 10))
You must login to post a comment. Don't have an account? Register to get one!