• 🏆 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!

Showing Damage Text (Trigger Help)

Status
Not open for further replies.
Level 3
Joined
Nov 19, 2004
Messages
13
Code:
regularattack
    Events
        Unit - Forest Troll Trapper 0099 <gen> Takes damage
    Conditions
    Actions
        Floating Text - Create floating text that reads (String((Integer((Damage taken))))) at (Position of (Triggering unit)) with Z offset 0.00, using font size 8.00, color (100.00%, 0.00%, 0.00%), and 0.00% transparency
        Floating Text - Change (Last created floating text): Disable permanence
        Floating Text - Set the velocity of (Last created floating text) to 64.00 towards 90.00 degrees
        Floating Text - Change the fading age of (Last created floating text) to 2.00 seconds
        Floating Text - Change the lifespan of (Last created floating text) to 3.00 seconds

This trigger displays the exact damage of any attack against the troll trapper that's specified in the event. The problem is, I'd like it to work for attacks against any unit in the game, and not just the troll trapper. How would I go about doing this?
 
Status
Not open for further replies.
Top