• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • ✅ The POLL for Hive's Texturing Contest #33 is OPEN! Vote for the TOP 3 SKINS! 🔗Click here to cast your vote!

Floating Text Damage are stacking!

Status
Not open for further replies.
Level 23
Joined
Apr 16, 2012
Messages
4,041
well this is a little bit tricky, because you never actually take 2 damage instances simultaenously(Looking for help may want to talk to me now :D cause afaik he said you can, but lets go with default Jass behaviour of 1 event per execution with 1 set value) so you will have to store every texttag to unit that it floats off from, and save something like time and then if it isnt past some time point(too far from unit) then you update it and re-send it with the higher value. This will most likely require Jass knowledge tho
 
Level 14
Joined
Dec 12, 2012
Messages
1,007
well this is a little bit tricky, because you never actually take 2 damage instances simultaenously(Looking for help may want to talk to me now :D cause afaik he said you can, but lets go with default Jass behaviour of 1 event per execution with 1 set value)

:D
To clarify things, some spells (like bash for example) execute two damage events in one spell, so the transition from the first event to the second takes zero game time (in contrast to a zero timer for example, which does consume game time). So in game logic, they happen simultaneously (but with their side effects still in correct order). Though that shouldn't be a problem here.

can we just make distance between damage?

I wouldn't try to solve it like this... If you skip damage events to prevent those stacks and show only every, say 5th damage event the visualization gets kind of useless.

As such a technique wouldn't account for the "importance" of a certain damage event, you might see 10 "unimportant" events of 5.4 damage, but with bad luck, the super-lucky-spectacular-level-10-hero-kill-with-300-damage would get filtered out. That would be very frustrating for the player I guess :D

Of course you could add exceptions for such things, but then the system isn't self-contained anymore and would require additional configuration and maintenance which is a bad thing.

It was very nice floating text..but copy ing it will ruin all my other triggers..i used GUI friendly damage detection one..

As you can use this also with Weeps DDS, I would also recommend this system (if you can use vJass libraries). Looks really nice and basically solves the problem.
 
Level 24
Joined
Aug 1, 2013
Messages
4,657
There are 2 things that I can think of:

-You could take a random angle for the floating text.
-You could display the damage that has been taken in the last second (updating on every damage event of that unit)

With the random angle, you should always be able to see the most important values but it is kinda hard to read which unit took the damage or to read the value at all.

The other one requires a good system but it should be worth trying.
You create a texttag for each unit that follows the unit.
Every time the unit takes damage, the value of the texttag increases by the damaged amount and a timer will start which removes the same amount after (...) time.
When the value is equal to 0, the texttag should be hidden.
 
Status
Not open for further replies.
Top