• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Life Steal with Attack Damage

Status
Not open for further replies.
Level 9
Joined
Apr 22, 2020
Messages
430
Hello guys i have made a custom of roar which i only want the plus damage to only be applied to my hero so i changed it's targets allowed to self so the hero can only have the plus damage and this spell has 3 levels obviously because it's a hero spell and can someone know how to trigger when the hero cast the custom hero roar ability to have a lifesteal? and how to tier it's life stolen per level of the roar.
 

Uncle

Warcraft Moderator
Level 64
Joined
Aug 10, 2018
Messages
6,537
  • Events:
  • A unit starts the effect of an ability
  • Conditions:
  • Ability being cast = Roar
  • Actions:
  • Add lifesteal (item ability) to Triggering unit
  • Set level of lifesteal (item ability) to level of Ability being cast
  • Wait X seconds
  • Remove lifesteal (item ability) from Triggering unit
For better functionality you can use a Unit Group + Loop trigger and periodically check for the buff. This is useful for removing the lifesteal ability when the caster dies/buff gets dispelled.

To do that, you add the caster to the Unit Group, turn on the Loop trigger, and then periodically check if the caster has the Roar buff. If it no longer has the buff you remove the Lifesteal ability from it and remove it from the group.
  • Events:
  • A unit starts the effect of an ability
  • Conditions:
  • Ability being cast = Roar
  • Actions:
  • Add lifesteal (item ability) to Triggering unit
  • Set level of lifesteal (item ability) to level of Ability being cast
  • Add Triggering unit to Roar_Group
  • Turn on Roar_Loop trigger
  • Roar Loop trigger
  • Events:
  • Every 0.10 seconds
  • Actions:
  • Pick every unit in Roar_Group and do:
  • If picked unit has buff Roar equal to False then:
  • Remove lifesteal (item ability) from picked unit
  • Remove picked unit from Roar_Group
  • -
  • If number of units in Roar_Group equal to 0 then:
  • Turn off this trigger
 
Last edited:
Level 9
Joined
Apr 22, 2020
Messages
430
  • Events:
  • A unit starts the effect of an ability
  • Conditions:
  • Ability being cast = Roar
  • Actions:
  • Add lifesteal (item ability) to Triggering unit
  • Set level of lifesteal (item ability) to level of Ability being cast
  • Wait X seconds
  • Remove lifesteal (item ability) from Triggering unit
For better functionality you can use a Unit Group + Loop trigger and periodically check for the buff. This is useful for removing the lifesteal ability when the caster dies/buff gets dispelled.

To do that, you add the caster to the Unit Group, turn on the Loop trigger, and then periodically check if the caster has the Roar buff. If it no longer has the buff you remove the Lifesteal ability from it and remove it from the group.
  • Events:
  • A unit starts the effect of an ability
  • Conditions:
  • Ability being cast = Roar
  • Actions:
  • Add lifesteal (item ability) to Triggering unit
  • Set level of lifesteal (item ability) to level of Ability being cast
  • Add Triggering unit to Roar_Group
  • Turn on Roar_Loop trigger
  • Roar Loop trigger
  • Events:
  • Every 0.10 seconds
  • Actions:
  • Pick every unit in Roar_Group and do:
  • If picked unit has buff Roar equal to False then:
  • Remove lifesteal (item ability) from picked unit
  • Remove picked unit from Roar_Group
  • -
  • If number of units in Roar_Group equal to 0 then:
  • Turn off this trigger
So uncle does the life steal also levels up when i level up the roar ability? For like level1 roar +10 damage and 20%life steal
Level2 roar +20damage and 40%life steal
Level3 roar +30damage and 60%life steal
 

Uncle

Warcraft Moderator
Level 64
Joined
Aug 10, 2018
Messages
6,537
Lifesteal ability has 3 levels, you simply set it's level to the level of Roar when you cast the spell.

-> Set level of lifesteal (item ability) to level of Ability being cast

Some item abilities can't have their Level set with triggers (not sure why), so make sure to test it out, maybe by setting level 1 to 0% lifesteal, and level 2 to like 100% so you can see if it's working.
 
Last edited:
Level 9
Joined
Apr 22, 2020
Messages
430
Lifesteal ability has 3 levels, you simply set it's level to the level of Roar when you cast the spell.

-> Set level of lifesteal (item ability) to level of Ability being cast

Some item abilities can't have their Level set with triggers (not sure why), so make sure to test it out, maybe by setting level 1 to 0% lifesteal, and level 2 to like 100% so you can see if it's working.
So do i have like to make a custom lifesteal Ability from the item lifesteal and make it a hero spell with 3 levels and the trigger: Set level of (My custom hero lifesteal with 3 levels) to level of ability bieng cast
 

Uncle

Warcraft Moderator
Level 64
Joined
Aug 10, 2018
Messages
6,537
It doesn't need to be a Hero ability and it can be custom, it's really up to you.

All that matters is that the ability has 3 levels.

It's quite simple, you're adding an item ability to the Hero, adjusting it's level, and then removing it after a period of time.

Note that most item abilities don't have visible buttons, but if it does have a visible button (icon), you can hide it by setting it's Art Button Position to X: 0, Y: -11.
 
Last edited:
Level 9
Joined
Apr 22, 2020
Messages
430
It doesn't need to be a Hero ability and it can be custom, it's really up to you.

All that matters is that the ability has 3 levels.

It's quite simple, you're adding an item ability to the Hero, adjusting it's level, and then removing it after a period of time.

Note that most item abilities don't have visible buttons, but if it does have a visible button (icon), you can hide it by setting it's Art Button Position to X: 0, Y: -11.
Ohh okay by the way uncle is that a Set Variable the trigger: Set ability of lifesteal blah blah blah..... And is Roar_Group the only variable i have to make for this trigger?
 

Uncle

Warcraft Moderator
Level 64
Joined
Aug 10, 2018
Messages
6,537
Simple version:
  • Simple Roar
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Roar
    • Actions
      • Unit - Add Item Life Steal to (Triggering unit)
      • Unit - Set level of Item Life Steal for (Triggering unit) to (Level of (Ability being cast) for (Triggering unit))
      • Wait 15.00 seconds
      • Unit - Remove Item Life Steal from (Triggering unit)
Advanced version:
  • Advanced Roar
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Roar
    • Actions
      • Unit - Add Item Life Steal to (Triggering unit)
      • Unit - Set level of Item Life Steal for (Triggering unit) to (Level of (Ability being cast) for (Triggering unit))
      • Unit Group - Add (Triggering unit) to Roar_Group
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Number of units in Roar_Group) Equal to 1
        • Then - Actions
          • Trigger - Turn on Roar Loop <gen>
        • Else - Actions
  • Roar Loop
    • Events
      • Time - Every 0.10 seconds of game time
    • Conditions
    • Actions
      • Unit Group - Pick every unit in Roar_Group and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ((Picked unit) has buff Roar) Equal to False
            • Then - Actions
              • Unit - Remove Item Life Steal from (Picked unit)
              • Unit Group - Remove (Picked unit) from Roar_Group.
            • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Number of units in Roar_Group) Equal to 0
        • Then - Actions
          • Trigger - Turn off (This trigger)
        • Else - Actions
^ Roar Loop should be Initially OFF (The checkbox near the top of the trigger next to Enabled)

Yes, Roar_Group is the only variable you need to make for the advanced setup. It's a Unit Group variable.
 
Last edited:
Level 9
Joined
Apr 22, 2020
Messages
430
Simple version:
  • Simple Roar
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Roar
    • Actions
      • Unit - Add Item Life Steal to (Triggering unit)
      • Unit - Set level of Item Life Steal for (Triggering unit) to (Level of (Ability being cast) for (Triggering unit))
      • Wait 15.00 seconds
      • Unit - Remove Item Life Steal from (Triggering unit)
Advanced version:
  • Advanced Roar
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Roar
    • Actions
      • Unit - Add Item Life Steal to (Triggering unit)
      • Unit - Set level of Item Life Steal for (Triggering unit) to (Level of (Ability being cast) for (Triggering unit))
      • Unit Group - Add (Triggering unit) to Roar_Group
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Number of units in Roar_Group) Equal to 1
        • Then - Actions
          • Trigger - Turn on Roar Loop <gen>
        • Else - Actions
  • Roar Loop
    • Events
      • Time - Every 0.10 seconds of game time
    • Conditions
    • Actions
      • Unit Group - Pick every unit in Roar_Group and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ((Picked unit) has buff Roar) Equal to False
            • Then - Actions
              • Unit - Remove Item Life Steal from (Picked unit)
              • Unit Group - Remove (Picked unit) from Roar_Group.
            • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Number of units in Roar_Group) Equal to 0
        • Then - Actions
          • Trigger - Turn off (This trigger)
        • Else - Actions
^ Roar Loop should be Initially OFF (The checkbox near the top of the trigger next to Enabled)

Yes, Roar_Group is the only variable you need to make for the advanced setup. It's a Unit Group variable.
Thank you so much uncle it works now! By the way i have another spell problem i hope i'm not bothering you for this i have created a custom metamorphises spell and i want my hero to have a passive command aura and brillance aura ability when the hero transforms or uses the metamorphesis spell i want those passive abilities to be on that hero so how should i trigger this?
 

Uncle

Warcraft Moderator
Level 64
Joined
Aug 10, 2018
Messages
6,537
I still don't understand why that doesn't work, weird game.

Anyway, to detect when a unit uses a Morph skill you need to use the Event below. We can use this method to add the abilities to the unit after it's done morphing.

In the case of Metamorphosis, the unit issues the "metamorphosis" order when it transforms to it's alternate form and again when it returns to normal.

Here's an example using the Demon Hunter and Metamorphosis. After 2.00 seconds, I add critical strike to what is now the transformed Demon Hunter. The Wait is important, since it takes about 1.5 seconds for the Demon Hunter to finish his transformation. Also, don't forget to put the Normal Form unit in the Conditions so that this trigger doesn't run again when the Demon Hunter returns to it's Normal Form.
  • Metamorphosis
    • Events
      • Unit - A unit Is issued an order with no target
    • Conditions
      • (Issued order) Equal to (Order(metamorphosis))
      • (Unit-type of (Triggering unit)) Equal to Demon Hunter
    • Actions
      • Wait 2.00 seconds
      • Unit - Add Critical Strike (Neutral Hostile) to (Triggering unit)
You can do this with other Morph abilties as well, just change the Issued order to the matching abilities Use/Turn On string. For example, Chemical Rage's order is "chemicalrage", simple enough.
 
Last edited:
Level 9
Joined
Apr 22, 2020
Messages
430
I still don't understand why that doesn't work, weird game.

Anyway, to detect when a unit uses a Morph skill you need to use the Event below. We can use this to add the abilities ourselves through triggers.

In the case of Metamorphosis, the unit issues the "metamorphosis" order when it transforms to it's alternate form and again when it returns to normal.

Here's an example using the Demon Hunter and Metamorphosis. After 2.00 seconds, I add critical strike to what is now the transformed Demon Hunter. The Wait is important, since it takes about 1.5 seconds for the Demon Hunter to finish his transformation. Also, don't forget to put the Normal Form unit in the Conditions so that this trigger doesn't run again when the Demon Hunter returns to it's Normal Form.
  • Metamorphosis
    • Events
      • Unit - A unit Is issued an order with no target
    • Conditions
      • (Issued order) Equal to (Order(metamorphosis))
      • (Unit-type of (Triggering unit)) Equal to Demon Hunter
    • Actions
      • Wait 2.00 seconds
      • Unit - Add Critical Strike (Neutral Hostile) to (Triggering unit)
You can do this with other Morph abilties as well, just change the Issued order to the matching abilities Use/Turn On string. For example, Chemical Rage's order is "chemicalrage", simple enough.
Thank you so much uncle! I don't know why but you are the only one who can help me create and understand when it comes to triggers LOL! Anyway thanks!
 
Level 24
Joined
Jun 26, 2020
Messages
1,852
Simple version:
  • Simple Roar
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Roar
    • Actions
      • Unit - Add Item Life Steal to (Triggering unit)
      • Unit - Set level of Item Life Steal for (Triggering unit) to (Level of (Ability being cast) for (Triggering unit))
      • Wait 15.00 seconds
      • Unit - Remove Item Life Steal from (Triggering unit)
Advanced version:
  • Advanced Roar
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Roar
    • Actions
      • Unit - Add Item Life Steal to (Triggering unit)
      • Unit - Set level of Item Life Steal for (Triggering unit) to (Level of (Ability being cast) for (Triggering unit))
      • Unit Group - Add (Triggering unit) to Roar_Group
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Number of units in Roar_Group) Equal to 1
        • Then - Actions
          • Trigger - Turn on Roar Loop <gen>
        • Else - Actions
  • Roar Loop
    • Events
      • Time - Every 0.10 seconds of game time
    • Conditions
    • Actions
      • Unit Group - Pick every unit in Roar_Group and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ((Picked unit) has buff Roar) Equal to False
            • Then - Actions
              • Unit - Remove Item Life Steal from (Picked unit)
              • Unit Group - Remove (Picked unit) from Roar_Group.
            • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Number of units in Roar_Group) Equal to 0
        • Then - Actions
          • Trigger - Turn off (This trigger)
        • Else - Actions
^ Roar Loop should be Initially OFF (The checkbox near the top of the trigger next to Enabled)

Yes, Roar_Group is the only variable you need to make for the advanced setup. It's a Unit Group variable.

I think its better just use
  • Wait fo condition (Triggering unit has roar Equal to False)[TRIGGER]
  • And then remove that ability or there is some thing I'm ignoring.
 
Level 24
Joined
Jun 26, 2020
Messages
1,852
Hello guys i have made a custom of roar which i only want the plus damage to only be applied to my hero so i changed it's targets allowed to self so the hero can only have the plus damage and this spell has 3 levels obviously because it's a hero spell and can someone know how to trigger when the hero cast the custom hero roar ability to have a lifesteal? and how to tier it's life stolen per level of the roar.
Hey, What you ask for is literally what the vampiric potion gives you, just turn that ability into a hero and that's it.
 
Level 24
Joined
Jun 26, 2020
Messages
1,852
@Uncle
Captura.PNG
 
Status
Not open for further replies.
Top