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

Status
Not open for further replies.
Level 19
Joined
Oct 7, 2014
Messages
2,209
Hello Hive!
I have some questions regarding floating texts.

1. Does floating text above a unit leaks?
2. Is there a limit of floating text in a game?
3. If there is a limit can I show the floating text when the player is pointing at the unit? (Note: I have 134 cities in my map.)
4. How do I show the floating text? I can't make it work.

  • Floaters
    • Events
      • Time - Elapsed game time is 2.00 seconds
    • Conditions
    • Actions
      • Floating Text - Create floating text that reads London above Capital 0005 <gen> with Z offset 0.00, using font size 15.00, color (100.00%, 100.00%, 100.00%), and 0.00% transparency
      • Floating Text - Show (Last created floating text) for (All players)
      • Floating Text - Change the color of (Last created floating text) to (0.00%, 100.00%, 0.00%) with 0.00% transparency
      • Floating Text - Create floating text that reads Wales above City 0006 <gen> with Z offset 0.00, using font size 15.00, color (100.00%, 100.00%, 100.00%), and 0.00% transparency
      • Floating Text - Show (Last created floating text) for (All players)
      • Floating Text - Change the color of (Last created floating text) to (0.00%, 100.00%, 0.00%) with 0.00% transparency
 
Last edited:
Level 18
Joined
May 11, 2012
Messages
2,103
1. Idk
2. 100
3. That is a good idea, but I'm not quite sure how to achieve that. You might need to use trackables.
4. Use color codes instead. Leave those percentages at 100% all three. I used to play with them and they (imo) are bugged.
 
Level 22
Joined
Feb 6, 2014
Messages
2,466
1. Idk
2. 100
3. That is a good idea, but I'm not quite sure how to achieve that. You might need to use trackables.
4. Use color codes instead. Leave those percentages at 100% all three. I used to play with them and they (imo) are bugged.

I don't think they are bugged.

Answering apcrab's question
1. Yes but adding lifespan or destroying them fixes this problem
2. Idk
3. BloodDrunk's suggestion is already good.
4. Strange, I don't know. I use Jass when using Floating Text and it works fine to me.
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,198
1. Does floating text above a unit leaks?
Floating text cannot leak because at most 100 can exist at any time. After 100 are in existence it recycles the last one.

However it might not be desirable for a floating text to persist longer than a certain time. This is to prevent you running into the limit and having to recycle the last one.
3. If there is a limit can I show the floating text when the player is pointing at the unit? (Note: I have 134 cities in my map.)
Yes you can and should. In your case periodically test where the player is viewing and if nearby a city then show it. This is how Skibi Tower Defense did the one mage builder.
 
Status
Not open for further replies.
Top