• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

[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