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

??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