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

Help Please

Status
Not open for further replies.
Level 4
Joined
Jun 10, 2009
Messages
67
How can u check the % of a units maximum hp?

For example:

A condition that can check (Attacked Unit) has less than 20% of its maximum health

Please help!
 
Level 16
Joined
Jul 21, 2008
Messages
1,121
Try this trigger:

  • Trigger
    • Events
      • -------- Your Events --------
    • Conditions
      • (Life of <Your Unit>) Less than ((Max life of <Your Unit>) / 4.00)
      • -------- With this condition Trigger will fire if your unit has less than 20% health --------
    • Actions
      • -------- Your Actions --------
Condition (Life of <Your Unit> Less than) is ''Real Comparison'', ''Max life of <Your Unit>'' is ''Unit - Property''
 
Last edited:
Status
Not open for further replies.
Top