• 🏆 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&Spells v2

This bundle is marked as useful / simple. Simplicity is bliss, low effort and/or may contain minor bugs.
A simple yet very useful system made from scratch mainly for my Arena map, but also looks good in RPG's or other maps.The triggering is pretty simple but I think this is pretty useful.

Creates floating texts whenever a unit takes damage or casts a spell, pretty self explaining, but check the map to see it in action!
-Player colored floating texts
-Can be configured
-MUI
-MPI
-Now Leakless


-Now uses Weep's damage detection to prevent leaks
-Added an example condition to prevent dummies from showing text on casting spells



  • Configuration
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Set tempGroup = (Units in (Playable map area))
      • Unit Group - Pick every unit in tempGroup and do (Trigger - Add to Floating Spell Name <gen> the event (Unit - (Picked unit) Starts the effect of an ability))
      • Custom script: call DestroyGroup(udg_tempGroup)
      • -------- Configure the duration and size of the floating texts --------
      • Set Text_Duration = 2.00
      • Set TextSize_dmg = 7.50
      • Set TextSize_spells = 10.00
      • -------- - --------
      • -------- These are strings to make the floating texts use the matching players colors --------
      • -------- Neutral Hostile will be using white --------
      • Set PlayerColors[1] = |c00FF0303
      • Set PlayerColors[2] = |c000042FF
      • Set PlayerColors[3] = |c001CE6B9
      • Set PlayerColors[4] = |c00540081
      • Set PlayerColors[5] = |c00FFFC01
      • Set PlayerColors[6] = |c00fEBA0E
      • Set PlayerColors[7] = |c0020C000
      • Set PlayerColors[8] = |c00E55BB0
      • Set PlayerColors[9] = |c00959697
      • Set PlayerColors[10] = |c007EBFF1
      • Set PlayerColors[11] = |c00106246
      • Set PlayerColors[12] = |c004E2A04
  • Configuration2
    • Events
      • Unit - A unit enters (Playable map area)
    • Conditions
    • Actions
      • Trigger - Add to Floating Spell Name <gen> the event (Unit - (Triggering unit) Starts the effect of an ability)
  • Floating Spell Name
    • Events
    • Conditions
      • (Unit-type of (Triggering unit)) Not equal to dummy unit (example)
    • Actions
      • Floating Text - Create floating text that reads (PlayerColors[(Player number of (Owner of (Triggering unit)))] + (Name of (Ability being cast))) above (Triggering unit) with Z offset 0.00, using font size TextSize_spells, color (100.00%, 100.00%, 100.00%), and 0.00% transparency
      • Floating Text - Set the velocity of (Last created floating text) to 100.00 towards 90.00 degrees
      • Floating Text - Change (Last created floating text): Disable permanence
      • Floating Text - Change the lifespan of (Last created floating text) to Text_Duration seconds
      • Floating Text - Change the fading age of (Last created floating text) to 0.65 seconds
  • Floating Damage Taken
    • Events
      • Game - GDD_Event becomes Equal to 0.00
    • Conditions
      • GDD_Damage Greater than 1.00
    • Actions
      • Floating Text - Create floating text that reads (PlayerColors[(Player number of (Owner of GDD_DamageSource))] + (String((Integer(GDD_Damage))))) above GDD_DamagedUnit with Z offset 0.00, using font size TextSize_dmg, color (100.00%, 100.00%, 100.00%), and 0.00% transparency
      • Floating Text - Set the velocity of (Last created floating text) to 100.00 towards 90.00 degrees
      • Floating Text - Change (Last created floating text): Disable permanence
      • Floating Text - Change the lifespan of (Last created floating text) to Text_Duration seconds
      • Floating Text - Change the fading age of (Last created floating text) to 0.65 seconds




Keywords:
system, floating text, floating, text, damage, spell, magic, color, player, colored, rpg, arena, cleaving, AoE
Contents

Floating Text - Damage&Spells v2 (Map)

Reviews
12th Dec 2015 IcemanBo: Too long time as NeedsFix. Rejected. 13:08, 30th May 2011 Maker: You're registering the event even for units that can't cast abilities. Why do you register the event for all units, why not use Unit - A unit Starts the...

Moderator

M

Moderator

12th Dec 2015
IcemanBo: Too long time as NeedsFix. Rejected.

13:08, 30th May 2011
Maker:
You're registering the event even for units that can't cast abilities.
Why do you register the event for all units, why not use Unit - A unit Starts the effect of an ability event
?
 

SpasMaster

Hosted Project: SC
Level 23
Joined
Jan 29, 2010
Messages
1,969
My thoughts on this System:

[+]From what I see, it's leakless.
[+]It's properley working, and it's not causing bugs.
[+]I like the hovering spell names!
[+]Easy to understand and import.
[+]The hovering damage has it color set to the one who is doing the damage.

[=]Healing could be added. Would be cool.

5/5 from me. Getting it in my map in no time. Credits will be given :)
 
Level 12
Joined
Dec 17, 2009
Messages
951
Best Dmg System i haved seen (pwn any vJass Sys)
5/5
My rewiew is the same
[+]From what I see, it's leakless.
[+]It's properley working, and it's not causing bugs.
[+]I like the hovering spell names!
[+]Easy to understand and import.
[+]The hovering damage has it color set to the one who is doing the damage.

[=]Healing could be added. Would be cool.

5/5 from me. Getting it in my map in no time. Credits will be given :)
 
Level 9
Joined
Dec 3, 2010
Messages
162
Here's how an event leak occurs (quoted from Weep).

1. You add an event to a trigger.
2. The event loses relevance (eg. if it's a unit event, and the unit gets removed from the game.)
3. You don't do anything else, and now there's a useless event attached to a trigger taking up memory.

To combat this, use dynamic triggers; supposedly, destroying a trigger destroys its events and conditions, but not its actions. (I'm just going by what I've read that others have reported, and how many systems are coded.)
 
Level 9
Joined
Jun 4, 2007
Messages
205
I implemented Weep's system just to make it leakless.

I haven't found any other system like this one uploaded in hive and I have no doubt some people will find good use of it, since it can be used almost in any map.

Also, I don't think it needs to be complicated to be useful, since most of our community doesn't know much on triggering.
 
Level 5
Joined
Oct 8, 2010
Messages
134
Neat system.
I am going to use this system in my project for sure.
My opinion 5/5 reasons:
- first time a Jass code did not crash (with my editor)
- works properly
- good documentation (in my opinion)
- really useful for: rpg maps, melee maps, and almost anything else
+ rep and vote for approval.
 
Level 5
Joined
Aug 6, 2009
Messages
136
It's a very usefull system.

Just 1 problem. When you cast shadow strike ( Miev's ability ) there is allready floating text to it. And i dont want 2 text's coming up, how to fix that?
 
Level 5
Joined
Oct 8, 2010
Messages
134
Could you configure it so we could also see healing,
Because that would be really sweet & Awesome for ORPG players/creators
 

Fud

Fud

Level 3
Joined
Aug 12, 2011
Messages
42
It will create double text for Critical Strikes, wind walk, and shadow strike...
also like everyone else said please add healing (though you've probably run out of colors by now ><.)

You could make healing displays yellow white and bigger than others with "+" on each side... this would easily distinguish it from the damage...
 
Top