Low HitPoint Detection Problem

Never_Quit

New Member
Reaction score
16
This is how i did it and it worked.

Trigger:
  • Low Hitpoint System
    • Events
      • Unit - A unit Is attacked
    • Conditions
      • And - All (Conditions) are true
        • Conditions
          • (Life of (Attacked unit)) Less than or equal to (0.21 x (Max life of (Attacked unit)))
          • (Life of (Attacked unit)) Greater than 0.00
          • Or - Any (Conditions) are true
            • Conditions
              • (Unit-type of (Attacked unit)) Equal to Barbarian
              • (Unit-type of (Attacked unit)) Equal to Healer
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • HealMessageDisplayed[(Player number of (Owner of (Attacked unit)))] Equal to False
        • Then - Actions
          • Floating Text - Create floating text that reads HirelingStrings[(Random integer number between 1 and 4)] above (Attacked unit) with Z offset 0.00, using font size 9.00, color (70.00%, 70.00%, 80.00%), and 0.00% transparency
          • Floating Text - Change (Last created floating text): Disable permanence
          • Floating Text - Set the velocity of (Last created floating text) to 64.00 towards 90.00 degrees
          • Floating Text - Change the lifespan of (Last created floating text) to 3.00 seconds
          • Floating Text - Change the fading age of (Last created floating text) to 2.50 seconds
          • Set HealMessageDisplayed[(Player number of (Owner of (Attacked unit)))] = True
        • Else - Actions


You would also need to add an event trigger that after they are healed or they die, the message boolean condition is set back to false. This method would only work with one hero per player.

Also, the code leaked badly prior to changes.
 

NoobImbaPro

You can change this now in User CP.
Reaction score
60
crusher, if this trigger doesn't work for you, can you see if other triggers work in this map?
If they do, you have set something wrong, or you re-edited array value of your string variable.



EDIT:HEYHEYHEY what the heck is that?

Floating Text - Create floating text that reads HirelingStrings[(Random integer number between 1 and 4)] at (Position of HirelingAttacked) with Z offset 0.00, using font size 9.00, color (70.00%, 70.00%, 80.00%), and 0.00% transparency
Floating Text - Create floating text that reads HirelingStrings[(Random integer number between 1 and 4)] above HirelingAttacked with Z offset 0.00, using font size 9.00, color (70.00%, 70.00%, 80.00%), and 0.00% transparency
Floating Text - Change (Last created floating text): Disable permanence

You keep the first floating text permanent......so edit it as you did too the second floating text.
 

DuelPlayer

Member
Reaction score
21
Use GDD..... Or use event
Trigger:
  • Unit - A unit Spawns a summoned unit
Then for condition use unit-type Then for action, add event to the trigger.
And ^^^^ ABOVE replace it with LESS THAN OR EQUAL TO
 

Bogrim

y hello thar
Reaction score
154
There isn't a need to use GDD or any other alternative solution. The trigger has been working from the beginning. As of now, the trigger fires the warning at 150.00 hit points precisely.

Your problem, Crusher, is just that you need to learn to read your own trigger. There aren't some hard-to-see bugs hidden away here. The trigger is working, you just need to understand how it works.

Pointing out the same mistake in different ways or all sorts of different alternatives doesn't help much either, it's confusing. If someone has written the same as you, just quote them and suggest the solution to the poster.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top