Don't think such a thing is possible at all in data, and even if, you would have no use of it since you can't display the value anywhere. What do you need this for? If it's to display damage done by players like the WoW addon "recount" or something similar, I'll move this thread to the trigger forum where it belongs, but until then I'll leave the thread here just in case you actually needed it to be done in the data editor.
anyway, the trigger answer: Use the "Any unit takes damage" event, then add the triggering damage amount to a variable. To get the DPS, just divide the variable by the time.
Also, this is not a smart thing to do - the "Any unit takes damage" event is one that fires a ridiculous amount of times in fights, and can cause tons of lag. If your map only has a handful of units (10-20) fighting at once who's damage you want to track, it might be playable, but if you're gonna have larger fights than that, it can get laggy very easily.
As always, this depends on what you actually do with the damage. If you just keep track of the damage in a variable and don't do anything else in the trigger, it won't be a huge deal.
Oh, nice. Didn't know that existed!
Although, I think in this case it won't help him as he said "how much damage in the last minute or so?", so for that specifically he'd need a variable.
Hey, is it possible to record the damage done per player, so i know which player done how much damage in the last minute or so?
Not in data, I think. You will most likely need triggers for this.
Don't think such a thing is possible at all in data, and even if, you would have no use of it since you can't display the value anywhere. What do you need this for? If it's to display damage done by players like the WoW addon "recount" or something similar, I'll move this thread to the trigger forum where it belongs, but until then I'll leave the thread here just in case you actually needed it to be done in the data editor.
anyway, the trigger answer: Use the "Any unit takes damage" event, then add the triggering damage amount to a variable. To get the DPS, just divide the variable by the time.
Also, this is not a smart thing to do - the "Any unit takes damage" event is one that fires a ridiculous amount of times in fights, and can cause tons of lag. If your map only has a handful of units (10-20) fighting at once who's damage you want to track, it might be playable, but if you're gonna have larger fights than that, it can get laggy very easily.
@TheAlmaity: Go
As always, this depends on what you actually do with the damage. If you just keep track of the damage in a variable and don't do anything else in the trigger, it won't be a huge deal.
You don't need a "Any unit takes damage" trigger.
Simply make a new variable and set its value to Function: Score. At the sciore field select the thing you want. Will look like this then:
With that you're able to calculate your DPS without a problem and no danger of lag.
Ok, this thread belongs to the trigger forum, as is see.
I want a simple "recount" and also generating a amount of "thread" per damage. more if its a tanking unit etc.
ill try it solution from hobrow
@Hobrow: Go
Oh, nice. Didn't know that existed!
Although, I think in this case it won't help him as he said "how much damage in the last minute or so?", so for that specifically he'd need a variable.
@kyr90: Go
Ok, I'll move this then :) GL
Hum, i did a "every second" trigger, which displays the value of this variable, but it always shows "0.0"...