• 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.

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

Status
Not open for further replies.
Level 10
Joined
Sep 16, 2016
Messages
269
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.
 
Level 12
Joined
May 22, 2015
Messages
1,051
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.
Top