Never_Quit
New Member
- Reaction score
- 16
This is how i did it and it worked.
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.
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
- Conditions
- Conditions
- And - All (Conditions) are true
- 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
- If - Conditions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- Events
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.