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

% of life of unit

Status
Not open for further replies.
Level 2
Joined
Mar 9, 2020
Messages
6
Hey. I need to ask how to make a trigger, for example if a certain unit type has less than 10% hp, he's getting max ms, 200% as, etc? I cant find a suitable event for that when a unit's life is lower than certain %.

Thanks in advance.
 
Level 22
Joined
Dec 4, 2007
Messages
1,528
very rough example:
  • berserker
    • Events
      • Time - Every 0.30 seconds of game time
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Percentage life of temp_unit) Less than or equal to 10.00
        • Then - Actions
          • Unit - Set temp_unit movement speed to 1000.00
          • Unit - Set Attack Interval of temp_unit to 0.50 for weapon index: 1
        • Else - Actions
          • Unit - Set temp_unit movement speed to 300.00
          • Unit - Set Attack Interval of temp_unit to 2.00 for weapon index: 1
 
Level 2
Joined
Mar 9, 2020
Messages
6
Nvm i didnt notice that thread must be accpeted by moderator, lol. I thought nobody want to help me, haha. I have alrdy figured out how to make it, but thanks anyway :)
 
Status
Not open for further replies.
Top