• 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.

??Floating Text Damage System??

Status
Not open for further replies.
Level 3
Joined
Jan 1, 2008
Messages
29
Hi!

Im searching for a PERFECT floating text system that
- Shows the damage that your hero does
- Shows healing
- Shows AOE type damage spells direct damage

Is it possible ?
 
Level 9
Joined
Apr 3, 2008
Messages
700
Ehm, you can do all without jass.
I used that trigger in my old map and it worked properly.

At first you need to add an event to trigger which will show damage.
  • Actions
    • Unit Group - Pick every unit in (UnitsMatchingCondition: ***)) and do (Actions)
      • Loop - Actions
        • Trigger - Add to Damage <gen> the event (Unit - (Picked unit) Takes damage)
    • Custom script: call DestroyGroup( GetLastCreatedGroup() )
Then, damaging trigger:
  • Conditions
    • ((Damage source) is A Hero) Equal to True
    • (Integer((Damage taken))) Greater than 0
  • 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 10.00, color (100.00%, 60.00%, 28.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 60.00 towards 90.00 degrees
    • Floating Text - Change the lifespan of (Last created floating text) to 3.00 seconds
    • Floating Text - Change the fading age of (Last created floating text) to 1.00 seconds
 
Level 11
Joined
Dec 31, 2007
Messages
780
that should work ... but that is only detecting for units that are placed in the game before you run that trigger... if you wanna add units that appeared in the game after the first trigger execution you have to do the same... else they wont be in the damage detection system

for ie: unit enters playable map area then Add to Damage <gen> the event (Unit - (entering unit) Takes damage)
 
Level 19
Joined
Aug 24, 2007
Messages
2,888
A damage detection system is very simple (difficult = 2/10)
hard thing is to make a leakless one (difficult = 8/10)
 
Status
Not open for further replies.
Top