Hey, so here is my problem I'm looking to create an ability that will give the killing hero 40% of the targets hit points upon death. Not 40% of weapon damage so a regular life leech from the unit itself will not work.
What i was thinking so far was this:
-Create a behavior using damage response with fetal box checked.
-Create a modify unit Effect and that gives 40% hp by using the Vitals fraction.
-Use the modify unit Effect in the Handled Effect in the damage response of the behavior.
This works, but only gives my hero 40% of his "own" HP. Not HP of the target unit.
So my question is... How would i go about getting the full amount of HP from target and give the Hero 40% of the targets Health.
I could be mistaken but i believe you would still just use a leech style of effect but rather than tieing it to the missile you would get the missle to apply a behavior that would then do the leeching back to the source or whatever.
Thank you for the quick response, but this ability is based off any damage done by said Hero. That's why I'm thinking of using a damage response behavior (with fetal checked) so when the hero kills some one he gains 40% of their max life. Correct me if I'm wrong but leeching as i mention before leeches only a percentage of damage dealt, from what i understand.
kk you really need to sort this out straight as your contradicting yourself say one you want the leech to be based of damage and then later saying by total health; again both of these are possible and i think your just thinking about it wrong. Im not saying you want the behavior already on either the attacking or attacked unit; im saying have the missle APPLY a one time behavior that does the leech and then does the damage or something similar and is removed. Your using the behavior is this was to simply determine the direction the leeching is going and still do the effect you are looking for.
I figured out how to do it all in data editor. I had to think outside the box but the ability is working as intended. Im on my mobile atm but will explain in depth when I am on my compiter.
My Projects:
Sorted Multiplayer Leader Board
Card Shuffle Dialog Demo
Air Wars Mass
Blizzard Fan since Starcraft. The Single Player story is AMAZING IMO, I can't wait for the Expansions. In Warcraft 3 I only enjoy the Custom Maps scene (& Blizzards...
Create 2 Behaviors one called "Kill Shot Buff" and the other "Kill Shot Prevent Death".
Create 4 Effects one called "Kill Shot Apply Death Prevention"(Apply Behavior), "Kill Shot Gain 40%"(Modify Unit), "Kill Shot Persistent"(Persistent), and "Kill Shot Take Vitals"(Damage).
Basically I used a behavior ability that when learned just gives a DUMMY behavior. Through the "Kill Shot Activate" Requirement that is placed in the requirement field of the behavior, which activates the "Kill Shot Buff". This gives the stalker a damage response to add a debuff ("Kill Shot Prevent Death") 100% of the time, to any unit it attacks (Using the "Kill Shot Apply Death Prevention" Effect through the handled effect field in damage response also set location to Attacker). The debuff called "Kill Shot Prevent Death" has a duration of 20 sec and allows the target unit to take 0 damage (set damage multiplier to 0 and Location to defender). The debuff on the target unit has a damage response on fetal damage which runs "Kill Shot Persistent" from the handled effect field in the damage response. Then make the Persistent have 2 periodic Effects that have a Period Duration of 0.02 sec. The first periodic effect should be "Kill Shot Gain 40%" which causes the target unit to heal to 40% HP (Effect Vitals change HP fraction to 0.4 in the modify unit Effect). Then immediately there is a "Damage Effect" that runs off the Persistent ("Kill Shot Take Vitals") that causes damage from the Effect Vital Fraction Current+ field which is set to 100% HP also set Effect Leech Fraction + field to 1 HP. To avoid your Editor from crashing by causing an unending LOOP, make sure the "KILL" flag is checked in the damage effect, or your target will never die from any damage and the editor will run this LOOP forever. Add the behavior to your Hero and your done.
Summary: Basically when a target is hit with a kill shot from the stalker he receives 40% HP healed. then that HP is transferred to caster killing the target unit if that makes sense.
P.S. This is not a tutorial as I do not posses the skills to make one, but if you have questions I am happy to help.
I havnt had time to test but from what I understand the damage response should pick up on the target heroes hp gains/loss because the hero is stillcialive which makes the buff that increases max hp still exist. So im hopeing that modify effect heal of 40% still picks up on the hp gains and losses. If that makes sence.
And yes I have since added a suicide effect because I was getting a little lagg on target death. I think the action was running twice then killed the target but the suicide fixed that issue.
Hey, so here is my problem I'm looking to create an ability that will give the killing hero 40% of the targets hit points upon death. Not 40% of weapon damage so a regular life leech from the unit itself will not work.
What i was thinking so far was this: -Create a behavior using damage response with fetal box checked. -Create a modify unit Effect and that gives 40% hp by using the Vitals fraction. -Use the modify unit Effect in the Handled Effect in the damage response of the behavior.
This works, but only gives my hero 40% of his "own" HP. Not HP of the target unit.
So my question is... How would i go about getting the full amount of HP from target and give the Hero 40% of the targets Health.
I could be mistaken but i believe you would still just use a leech style of effect but rather than tieing it to the missile you would get the missle to apply a behavior that would then do the leeching back to the source or whatever.
Thank you for the quick response, but this ability is based off any damage done by said Hero. That's why I'm thinking of using a damage response behavior (with fetal checked) so when the hero kills some one he gains 40% of their max life. Correct me if I'm wrong but leeching as i mention before leeches only a percentage of damage dealt, from what i understand.
@Triflin: Go
kk you really need to sort this out straight as your contradicting yourself say one you want the leech to be based of damage and then later saying by total health; again both of these are possible and i think your just thinking about it wrong. Im not saying you want the behavior already on either the attacking or attacked unit; im saying have the missle APPLY a one time behavior that does the leech and then does the damage or something similar and is removed. Your using the behavior is this was to simply determine the direction the leeching is going and still do the effect you are looking for.
I would use a dummy effect and use triggers to heal the correct amount.
Contribute to the wiki (Wiki button at top of page) Considered easy altering of the unit textures?
https://www.sc2mapster.com/forums/resources/tutorials/179654-data-actor-events-message-texture-select-by-id
https://media.forgecdn.net/attachments/187/40/Screenshot2011-04-17_09_16_21.jpg
I figured out how to do it all in data editor. I had to think outside the box but the ability is working as intended. Im on my mobile atm but will explain in depth when I am on my compiter.
@Triflin: Go
Nice look forward to hear how you did it.
Sorry for the long wait. Here is how I did it.
Basically I used a behavior ability that when learned just gives a DUMMY behavior. Through the "Kill Shot Activate" Requirement that is placed in the requirement field of the behavior, which activates the "Kill Shot Buff". This gives the stalker a damage response to add a debuff ("Kill Shot Prevent Death") 100% of the time, to any unit it attacks (Using the "Kill Shot Apply Death Prevention" Effect through the handled effect field in damage response also set location to Attacker). The debuff called "Kill Shot Prevent Death" has a duration of 20 sec and allows the target unit to take 0 damage (set damage multiplier to 0 and Location to defender). The debuff on the target unit has a damage response on fetal damage which runs "Kill Shot Persistent" from the handled effect field in the damage response. Then make the Persistent have 2 periodic Effects that have a Period Duration of 0.02 sec. The first periodic effect should be "Kill Shot Gain 40%" which causes the target unit to heal to 40% HP (Effect Vitals change HP fraction to 0.4 in the modify unit Effect). Then immediately there is a "Damage Effect" that runs off the Persistent ("Kill Shot Take Vitals") that causes damage from the Effect Vital Fraction Current+ field which is set to 100% HP also set Effect Leech Fraction + field to 1 HP. To avoid your Editor from crashing by causing an unending LOOP, make sure the "KILL" flag is checked in the damage effect, or your target will never die from any damage and the editor will run this LOOP forever. Add the behavior to your Hero and your done.
Summary: Basically when a target is hit with a kill shot from the stalker he receives 40% HP healed. then that HP is transferred to caster killing the target unit if that makes sense.
P.S. This is not a tutorial as I do not posses the skills to make one, but if you have questions I am happy to help.
Nice solution. How resilient is it to a healing aura/life regen increase buff?
Consider adding a suicide damage effect at the end just to make sure.
Contribute to the wiki (Wiki button at top of page) Considered easy altering of the unit textures?
https://www.sc2mapster.com/forums/resources/tutorials/179654-data-actor-events-message-texture-select-by-id
https://media.forgecdn.net/attachments/187/40/Screenshot2011-04-17_09_16_21.jpg
@DrSuperEvil: Go
I havnt had time to test but from what I understand the damage response should pick up on the target heroes hp gains/loss because the hero is stillcialive which makes the buff that increases max hp still exist. So im hopeing that modify effect heal of 40% still picks up on the hp gains and losses. If that makes sence.
And yes I have since added a suicide effect because I was getting a little lagg on target death. I think the action was running twice then killed the target but the suicide fixed that issue.
Just if you have a damage nullify on fatal damage the unit can make a comeback unless suicided.
Contribute to the wiki (Wiki button at top of page) Considered easy altering of the unit textures?
https://www.sc2mapster.com/forums/resources/tutorials/179654-data-actor-events-message-texture-select-by-id
https://media.forgecdn.net/attachments/187/40/Screenshot2011-04-17_09_16_21.jpg