Is it possible to calculate attack cooldown of a hero and display it?

MasterRofl

New Member
Reaction score
8
I'm looking for a trigger that can show how many times a unit attacks per minute, and was just wondering if this was possible.

Thanks
 

Flare

Stops copies me!
Reaction score
662
I'd say not very easily - you could replicate the unit you want (I think the gamecache Store Unit function can create an exact copy with items/abilities intact) and order it to attack a pre-placed magic immune target dummy (one for each player) - then, when <dummy> takes damage, and BooleanVar[Player number] = false, start a timer and set BooleanVar to true.
When the dummy takes damage again (check if BooleanVar[Player number] is true), set a real variable to GetElapsedTime (YourTimerVar), remove the replicated unit, set BooleanVar[Player number] to false again, and display the value of the real variable to the player.

Also, make sure that you can't activate the trigger more than once every X seconds, so people can't create a second testing unit, which would obviously screw up your results (easiest way would probably be to check if BooleanVar[Player number of Triggering Player <assuming you're using a chat command, or Escape key>] is true or false - if true, don't do the test (since it's already running), else do the test)
 
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