Tinki3
Special Member
- Reaction score
- 418
A short and sweet trigger that displays mana or health regeneration/sec with some "good" accuracy.
- Only use when testing a map
- Only supports player red
- Disable the trigger when you don't need it
- Select a unit or two to display regen
If you'd like to display HP regen instead, change the variable 'M' to store current health.
The first Floating Text action also needs to read: "Floating Text - Create floating text that reads (String(((Health of U[(Integer A)])...."
Demo map available here.
- Only use when testing a map
- Only supports player red
- Disable the trigger when you don't need it
- Select a unit or two to display regen
Code:
Display Mana Regen
Events
Time - Every 1.00 seconds of game time
Conditions
Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
B Equal to True
Then - Actions
Set I = 0
Custom script: set bj_wantDestroyGroup = true
Unit Group - Pick every unit in (Units in (Playable map area) matching (((Matching unit) is selected by Player 1 (Red)) Equal to True)) and do (Actions)
Loop - Actions
Set I = (I + 1)
Set U[I] = (Picked unit)
Set M[I] = (Mana of U[I])
Set B = False
Else - Actions
For each (Integer A) from 1 to I, do (Actions)
Loop - Actions
Floating Text - Create floating text that reads (String(((Mana of U[(Integer A)]) - M[(Integer A)]))) above U[(Integer A)] with Z offset 0.00, using font size 10.00, color (0.00%, 0.00%, 100.00%), and 0.00% transparency
Floating Text - Change (Last created floating text): Disable permanence
Floating Text - Change the lifespan of (Last created floating text) to 4.00 seconds
Floating Text - Change the fading age of (Last created floating text) to 2.50 seconds
Floating Text - Set the velocity of (Last created floating text) to 64.00 towards 90.00 degrees
Set B = True
If you'd like to display HP regen instead, change the variable 'M' to store current health.
The first Floating Text action also needs to read: "Floating Text - Create floating text that reads (String(((Health of U[(Integer A)])...."
Demo map available here.