• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

[Spell] Permanent Bonus Damage per kill

Level 13
Joined
Sep 11, 2013
Messages
467
Greetings!:peasant-waving:
I wish to create a new simple passive for a hero, but I don't know how.. In my map multiple heroes (4) can has the same passive.
This passive must have 4 levels and must give to the hero + 3/7/11/15 permanent damage (with green) each time when the hero kill an enemy unit/building.
I wish that permanent bonus damage remain on the hero even if the hero die and respawn from Altar again.
The permanent bonus damage can grow to infinity.:peasant-work-work:

The help is appreciated!:peasant-bowing:
 

Uncle

Warcraft Moderator
Level 73
Joined
Aug 10, 2018
Messages
7,877
Greetings!:peasant-waving:
I wish to create a new simple passive for a hero, but I don't know how.. In my map multiple heroes (4) can has the same passive.
This passive must have 4 levels and must give to the hero + 3/7/11/15 permanent damage (with green) each time when the hero kill an enemy unit/building.
I wish that permanent bonus damage remain on the hero even if the hero die and respawn from Altar again.
The permanent bonus damage can grow to infinity.:peasant-work-work:

The help is appreciated!:peasant-bowing:
The most basic way:

1) Create four abilities based on Item Attack Damage Bonus and give each one a different Level's damage (3, 7, 11, 15).
2) Create an Ability Code array variable called Passive_Damage_Bonus.
3) Create a new trigger and assign the new abilities to your Array with the [index] representing each Level:
  • Events
    • Time - Elapsed game time is 0.00 seconds
  • Conditions
  • Actions
    • Set Variable Passive_Damage_Bonus[1] = Item Attack Damage Bonus (+3)
    • Set Variable Passive_Damage_Bonus[2] = Item Attack Damage Bonus (+7)
    • Set Variable Passive_Damage_Bonus[3] = Item Attack Damage Bonus (+11)
    • Set Variable Passive_Damage_Bonus[4] = Item Attack Damage Bonus (+15)
4) Create a new Integer variable called Passive_Damage_Level.
5) Create a new trigger which runs whenever a unit with your Passive ability kills another unit:
  • Events
    • Unit - A unit Dies
  • Conditions
    • (Level of Your Passive for (Killing unit)) Greater than 0
  • Actions
    • Set Variable Passive_Damage_Level = (Level of Your Passive for (Killing unit))
    • Unit - Add Passive_Damage_Bonus[Passive_Damage_Level] to (Killing unit)
    • Custom script: call UnitMakeAbilityPermanent( GetKillingUnit(), true, udg_Passive_Damage_Bonus[udg_Passive_Damage_Level] )
That should add a permanent copy of the ability to your unit which SHOULD stack (a lot of Item abilities stack with one another). If you change the name of the variables you will need to update the Custom Script to use those new names.

But the more efficient way is to create one single Item Attack Damage Bonus ability, add a permanent copy to your unit upon Learning the skill for the first time, and then modify it's Damage Bonus using the Set Ability Field actions whenever you kill a unit. I attached a map with a working example. You MAY have to reapply it's values after the hero Revives.
 

Attachments

  • Stacking Attack Damage 1.w3m
    24.6 KB · Views: 5
Last edited:
Level 13
Joined
Sep 11, 2013
Messages
467
The most basic way:

1) Create four abilities based on Item Attack Damage Bonus and give each one a different Level's damage (3, 7, 11, 15).
2) Create an Ability Code array variable called Passive_Damage_Bonus.
3) Create a new trigger and assign the new abilities to your Array with the [index] representing each Level:
  • Events
    • Time - Elapsed game time is 0.00 seconds
  • Conditions
  • Actions
    • Set Variable Passive_Damage_Bonus[1] = Item Attack Damage Bonus (+3)
    • Set Variable Passive_Damage_Bonus[2] = Item Attack Damage Bonus (+7)
    • Set Variable Passive_Damage_Bonus[3] = Item Attack Damage Bonus (+11)
    • Set Variable Passive_Damage_Bonus[4] = Item Attack Damage Bonus (+15)
4) Create a new Integer variable called Passive_Damage_Level.
5) Create a new trigger which runs whenever a unit with your Passive ability kills another unit:
  • Events
    • Unit - A unit Dies
  • Conditions
    • (Level of Your Passive for (Killing unit)) Greater than 0
  • Actions
    • Set Variable Passive_Damage_Level = (Level of Your Passive for (Killing unit))
    • Unit - Add Passive_Damage_Bonus[Passive_Damage_Level] to (Killing unit)
    • Custom script: call UnitMakeAbilityPermanent( GetKillingUnit(), true, udg_Passive_Damage_Bonus[udg_Passive_Damage_Level] )
That should add a permanent copy of the ability to your unit which SHOULD stack (a lot of Item abilities stack with one another). If you change the name of the variables you will need to update the Custom Script to use those new names.

But the more efficient way is to create one single Item Attack Damage Bonus ability, add a permanent copy to your unit upon Learning the skill for the first time, and then modify it's Damage Bonus using the Set Ability Field actions whenever you kill a unit. I attached a map with a working example. You MAY have to reapply it's values after the hero Revives.
I thought it was much easier to do, but it seems that it was impossible to do this spell by myself.
What you do on this forum is Outstanding! Thank you so much! It work perfect!
 
Top