DPS meter help

IronTrout

New Member
Reaction score
20
So I've been working on this damage per second meter (like the ones found on wow).. and well, i've gotten it to pretty much completely work, bar one major factor. For some reason my maths sucks, and is returning a number that doesn't sound right (It does the opposite of what i want :nuts:) I've done the entire thing in vanilla world editor GUI and in desperate need of help. I've attached the entire map to it and u can find all the meter junk under "DPS Counter" folder.

Um, there are some heroes on there too if u want em =3

P.S: If possible try to keep it in GUI (if not, then I'm not all that picky)
P.P.S: I just got WEU, so you can use that too.

View attachment 35454
 

Tyman2007

Ya Rly >.
Reaction score
74
Don't get WEU.. It does a lot more harm than good at times.

Try jass newgen even if you don't know how to use jass

it's a whole lot better than WEU
 

Tyman2007

Ya Rly >.
Reaction score
74
Not everyone plays WoW, what is DPS Meter

Damage Per Second meter
Measures your damage and the time you have been in combat, then calculates your average damage per second.

You deal 60000 damage in 60 seconds, your dps is 1000
you deal 30000 damage in 30 seconds, then take a 30 second break, then deal another 30000 damage in 30 seconds, your dps is 1000.
 

IronTrout

New Member
Reaction score
20
Lol tried Newgen.. Didn't wanna run Wc3 tho, so i gave up. Maybe i'll just stick to vanilla :3
 

IronTrout

New Member
Reaction score
20
So yeah, umm back to the question :p.

here's the code. Its confusing as all hell tho. so the multiboard triggers are to monitor them.

Trigger:
  • Create
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Wait 2.00 seconds
      • Leaderboard - Create a leaderboard for (All players) titled DPS Meter
        • Do Multiple ActionsFor each (Integer A) from 1 to 6, do (Actions)
          • Loop - Actions
            • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
              • If - Conditions
                • ((Player((Integer A))) slot status) Equal to (==) Is playing
              • Then - Actions
                • Set DPS_Hero = (Random unit from (Units owned by (Player((Integer A))) matching (((Picked unit) is A Hero) Equal to (==) True)))
                  • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • (Name of DPS_Hero) Equal to (==) <Empty String>
                    • Then - Actions
                      • Leaderboard - Add (Player((Integer A))) to (Last created leaderboard) with label (<Observing> + (([ + (Name of (Player((Integer A))))) + ])) and value 0
                    • Else - Actions
                      • Leaderboard - Add (Player((Integer A))) to (Last created leaderboard) with label ((Name of DPS_Hero) + (([ + (Name of (Player((Integer A))))) + ])) and value 0
              • Else - Actions
                • Do nothing


Trigger:
  • DPS 1
    • Events
      • Unit - A unit Is attacked
    • Conditions
      • ((Attacking unit) is in (Units owned by Player 1 (Red))) Equal to (==) True
    • Actions
      • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ((Attacked unit) is in DPS1_UnitGrp) Equal to (==) False
        • Then - Actions
          • Unit Group - Add (Attacked unit) to DPS1_UnitGrp
          • Unit - Set the custom value of (Attacked unit) to (Integer((Life of (Attacked unit))))
          • Set DPS1_Health = (DPS1_Health + (Integer((Life of (Attacked unit)))))
        • Else - Actions
          • Do nothing
      • Set DPS1_Checker = (DPS1_Timer + 40)
      • Trigger - Turn on DPS Counter 1 <gen>


Trigger:
  • DPS Spell 1
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • ((Casting unit) is in (Units owned by Player 1 (Red))) Equal to (==) True
    • Actions
      • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ((Target unit of ability being cast) is in DPS1_UnitGrp) Equal to (==) False
        • Then - Actions
          • Unit Group - Add (Target unit of ability being cast) to DPS1_UnitGrp
          • Unit - Set the custom value of (Target unit of ability being cast) to (Integer((Life of (Target unit of ability being cast))))
          • Set DPS1_Health = (DPS1_Health + (Integer((Life of (Target unit of ability being cast)))))
        • Else - Actions
          • Do nothing
      • Game - Display to (All players) for 30.00 seconds the text: willy
      • Set DPS1_Order = (Current order of (Casting unit))
      • Wait 2.00 seconds
      • Set DPS1_Checker = (DPS1_Timer + 100)
      • Trigger - Turn on DPS Counter 1 <gen>


Trigger:
  • DPS Counter 1
    • Events
      • Time - Every 0.10 seconds of game time
    • Conditions
    • Actions
      • Trigger - Turn off (This trigger)
      • Set DPS1_Timer = (DPS1_Timer + 1)
      • Unit Group - Pick every unit in DPS1_UnitGrp and do (Actions)
        • Loop - Actions
          • Set DPS1_damage = (DPS1_damage + ((Custom value of (Picked unit)) - (Integer((Life of (Picked unit))))))
          • Set DPS1_Dps = ((DPS1_Health - DPS1_damage) / (DPS1_Timer / 10))
          • Unit - Set the custom value of (Picked unit) to (Integer((Life of (Picked unit))))
      • Leaderboard - Change the value for Player 1 (Red) in (Last created leaderboard) to DPS1_Dps
        • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
          • If - Conditions
            • DPS1_Timer Equal to (==) DPS1_Checker
          • Then - Actions
            • Trigger - Turn off (This trigger)
            • Set DPS1_damage = 0
            • Set DPS1_Timer = 0
            • Set DPS1_Health = 0
            • Set DPS1_Checker = 0
            • Game - Display to Player Group - Player 1 (Red) for 5.00 seconds the text: Reset All
          • Else - Actions
            • Trigger - Turn on DPS Counter 1 <gen>

Not Initially on

Trigger:
  • Killed Unit DPS 1
    • Events
      • Unit - A unit Dies
    • Conditions
      • ((Dying unit) is in DPS1_UnitGrp) Equal to (==) True
    • Actions
      • Unit Group - Remove (Dying unit) from DPS1_UnitGrp
      • Game - Display to (All players) for 5.00 seconds the text: (Number of units in DPS_Grp1 = + (String((Number of units in DPS1_UnitGrp))))


Trigger:
  • Multiboard
    • Events
      • Time - Elapsed game time is 2.00 seconds
    • Conditions
    • Actions
      • Multiboard - Create a multiboard with 2 columns and 5 rows, titled Information
      • Set DELETETHIS = (Last created multiboard)
        • Do Multiple ActionsFor each (Integer A) from 1 to 2, do (Actions)
          • Loop - Actions
            • Do Multiple ActionsFor each (Integer B) from 1 to 5, do (Actions)
              • Loop - Actions
                • Multiboard - Set the width for (Last created multiboard) item in column (Integer A), row (Integer B) to 16.00% of the total screen width
      • Multiboard - Set the text for (Last created multiboard) item in column 1, row 1 to Group HP
      • Multiboard - Set the text for (Last created multiboard) item in column 1, row 2 to Total Damage
      • Multiboard - Set the text for (Last created multiboard) item in column 1, row 3 to DPS
      • Multiboard - Set the text for (Last created multiboard) item in column 1, row 4 to # units in Grp
      • Multiboard - Set the text for (Last created multiboard) item in column 1, row 5 to Timer
      • Trigger - Turn on Multiboard Run <gen>


Trigger:
  • Multiboard Run
    • Events
      • Time - Every 0.10 seconds of game time
    • Conditions
    • Actions
      • Multiboard - Set the text for DELETETHIS item in column 2, row 1 to (String(DPS1_Health))
      • Multiboard - Set the text for DELETETHIS item in column 2, row 2 to (String(DPS1_damage))
      • Multiboard - Set the text for DELETETHIS item in column 2, row 3 to (String(DPS1_Dps))
      • Multiboard - Set the text for DELETETHIS item in column 2, row 4 to (String((Number of units in DPS1_UnitGrp)))
      • Multiboard - Set the text for DELETETHIS item in column 2, row 5 to (((String(DPS1_Timer)) + / ) + (String(DPS1_Checker)))


Where am i going wrong?

P.S I know its leaky
 

IronTrout

New Member
Reaction score
20
Hmm... did you notice the NewGen World Editor? NewGen Wc3 is for benchmarking :p.

Yeah, it didnt run anything before. I got it to work tho. I had to reinstall wc3 with patch from a while ago. I have online wc3 on other harddrive now.
 

Nenad

~Choco Coronet~ Omnomnom
Reaction score
137
You don't register any damage with your triggers. Unit is attacked and Unit starts the effects of an ability are not triggers that register damage. Try using GDD and registering the damage properly, then saving that damage into a real variable. I don't know if you're timer works or not, but this should always show 0 as far as the trigger goes (or perhaps, an inaccurate value).
 

IronTrout

New Member
Reaction score
20
Thanks Nenad. Your a life saver. That was really annoying me :p

GDD worked surprisingly well +rep
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top