• 🏆 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!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Spell Vamp, AoE Spell and Healing Text Problem

Status
Not open for further replies.
Level 11
Joined
Sep 14, 2009
Messages
284
Kind of an long title right? Anyways, in my map I have a custom floating damage text system that displays physical and magic damage and healing.

I use a custom stat called Spell Vamp that works like Life Steal but for magic damage.
Everything works correctly, but I want to improve something.

When AoE spells does damage, the source gets healed for each unit hit, resulting in an amount of floating texts equal to the number of units hit.
I want it so that even if the AoE spell hits numerous units, the Spell Vamp amount displayed will only be displayed as a single floating text the dispays the sum of all units hit.

I use various boolean flags like "AbilityMagic", "AbilityAoE" etc, so you should get a picture of how it works.

Anyone got any ideas?
 
Disable the floating text system before you deal your AoE damage (disable the trigger), create the custom floating text within that specific spell's trigger, and then enable the floating text system again. That seems like the easiest solution to me.

If you don't want to make the custom floating text in the spell trigger, you can always use a dummy unit and damage that unit for the total of the AoE damage (and set the booleans appropriately).
 
Level 21
Joined
Mar 27, 2012
Messages
3,232
One idea would be using a 0-timer.
Basically so that you store the spell vamp amount in a variable and start a timer. Since all damage done on the same frame will stay inside the timer, then this will guarantee that the timer function runs after all damage is done.
Then when the timer is done you create the floating text as usual.
 
Status
Not open for further replies.
Top