• 🏆 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!

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