• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

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