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

[Trigger] Setting Variable to damage a unit is hit for

Status
Not open for further replies.
Level 2
Joined
Jan 26, 2009
Messages
13
Hi! For one of the triggered-abilities I'm making, I need to use a variable that is set to the damage a unit is hit for; however, I can't find any function for it.
Can anybody tell me if its possible to do this, and if so, how?

I'm using the the event "Unit - A unit Is attacked".
 
Level 6
Joined
May 13, 2009
Messages
260
Here is one solution:
  • Dmg
    • Events
      • Unit - A unit Is attacked
    • Conditions
    • Actions
      • Set Dmg = (Integer((Damage taken)))
*Note* Dmg is a integer and i used the "convert real to integer" and the "event response damage taken". Hope it works :)
 
Status
Not open for further replies.
Top