• 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.
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!
  • ✅ The POLL for Hive's Texturing Contest #34 is OPEN! Vote for the TOP 3 SKINS! 🔗Click here to cast your vote!
  • ✅ The POLL for Hive's Techtree Contest #20 is OPEN! Vote for the TOP 3 FACTIONS! 🔗Click here to cast your vote!

Max Health Condition

Status
Not open for further replies.
Here's how you could get it to do [Iterations] amount of operations for each 5% lost.

Not sure about when it is healed, but it's simply finding the right event to trigger it, or if you heal via triggers, then use this there.

  • Untitled Trigger 001
    • Events
      • Unit - A unit Is attacked
    • Conditions
    • Actions
      • Set iterations = ((((Max life of (Triggering unit)) - (Life of (Triggering unit))) / (Max life of (Triggering unit))) x 20.00)
      • For each (Integer A) from 1 to (Integer(iterations)), do (Actions)
        • Loop - Actions
          • Game - Display to (All players) the text: (String(iterations))
          • -------- Do things here --------
The X 20.00 is to calculate percentage and then find each 5% [100%/5%]

For some reason this took wayyy too much fiddling on my part. :ogre_haosis:
 
Here's how you could get it to do [Iterations] amount of operations for each 5% lost.

Not sure about when it is healed, but it's simply finding the right event to trigger it, or if you heal via triggers, then use this there.

  • Untitled Trigger 001
    • Events
      • Unit - A unit Is attacked
    • Conditions
    • Actions
      • Set iterations = ((((Max life of (Triggering unit)) - (Life of (Triggering unit))) / (Max life of (Triggering unit))) x 20.00)
      • For each (Integer A) from 1 to (Integer(iterations)), do (Actions)
        • Loop - Actions
          • Game - Display to (All players) the text: (String(iterations))
          • -------- Do things here --------
The X 20.00 is to calculate percentage and then find each 5% [100%/5%]

For some reason this took wayyy too much fiddling on my part. :ogre_haosis:

Works perfect thank you
 
Status
Not open for further replies.
Back
Top