• 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.
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!
  • ✅ The POLL for Hive's Texturing Contest #34 is OPEN! Vote for the TOP 3 SKINS! 🔗Click here to cast your vote!
  • ✅ The POLL for Hive's Techtree Contest #20 is OPEN! Vote for the TOP 3 FACTIONS! 🔗Click here to cast your vote!

A Spell that gives a hero stats when it kills a unit

Status
Not open for further replies.
When a unit dies, check if the level of that specific spell from the killer is greater than 0, then create a tome and give it to the killer.

Ps: I don't think this is really worth for a help. It's all in the trigger editor.
You can actually modify hero attributes using triggers. No need for tomes.

Tomes leak if you do not add special code to delete them after they're used (the invisible dead item persists indefinitely). Not a huge deal normally, but if you get a tome every time the hero kills a unit, it could leak a lot of them quite quickly.

Here's what the trigger should look like, roughly. I don't remember what the attribute modifying action looks like exactly, but I think it might need to be built the way I put it.
  • Strength Gain
  • Events
    • Unit - A unit dies
  • Conditions
    • Level of (Strength Gain Ability) for (Killing unit) Greater than 0
  • Actions
    • Hero - Set Strength of (Killing unit) to (Strength of (Killing unit) + 1)
 
Status
Not open for further replies.
Back
Top