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

Variable

Status
Not open for further replies.
Level 9
Joined
Feb 20, 2014
Messages
409
Hi!
I want to make a variable related to one of the stats of my hero.
Exemple : Variable=Strenght (of my hero)

But then when I try to make a trigger which adds the strenght as dammage to the attacked unit I can't.
Event : My hero starts to cast a spell
Action: Set life of attacked unti to life of attacked unit - variable (strenght here)
I can't do this.
 
Level 12
Joined
Mar 24, 2011
Messages
1,082
I believe you are looking for Real(Strength of (Triggering Unit))

Variable type should be Real.

PS: No WE over here, so could not check the exact syntax, but it should look very similar. It should be under "Unit - Hero attribute" or "Hero - Attribute".
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,285
Action: Set life of attacked unti to life of attacked unit - variable (strenght here)
You will need to use the unit damage unit action to deal the extra damage. This is so that the kill is properly credited otherwise it will appear the victim suicide and so not award any experience, bounty or kill credit.
 
Status
Not open for further replies.
Top