- Joined
- Jan 23, 2020
- Messages
- 86
I'm adding a system where if you have a unit selected there is an ability placeholder that will tell you that unit's DPS.
I am probably doing it wrong, here is the trigger:
And "DPS" ability
So I am looking to solve two issues
1. Optimize/Fix the DPS trigger
2. Create abbreviations for long numbers
eg.
10,000 = 10k
100,000 = 100k
1,000,000 = 1M etc...
I am probably doing it wrong, here is the trigger:
-
DPS
-
Events
-
Unit - A unit Takes damage
-
-
Conditions
-
((Damage source) is selected by (Owner of (Damage source)).) Equal to True
-
-
Actions
-
Set VariableSet PN = (Player number of (Owner of (Damage source)))
-
Set VariableSet DPSUnit[PN] = (Damage source)
-
Set VariableSet DPS[PN] = (DPS[PN] + (Damage taken))
-
-
And "DPS" ability
-
DPS Timer
-
Events
-
Time - Every 1.00 seconds of game time
-
-
Conditions
-
Actions
-
Player Group - Pick every player in ActivePlayers and do (Actions)
-
Loop - Actions
-
Set VariableSet PN = (Player number of (Picked player))
-
Ability - Set Extended Tooltip of DPS (Icon) to ((Name of DPSUnit[PN]) + ( + (String(DPS[PN], 0, 0)))) for level 0
-
Set VariableSet DPS[PN] = 0.00
-
-
-
-
So I am looking to solve two issues
1. Optimize/Fix the DPS trigger
2. Create abbreviations for long numbers
eg.
10,000 = 10k
100,000 = 100k
1,000,000 = 1M etc...