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

How to make a floating text stay above a unit

Status
Not open for further replies.
Level 18
Joined
Aug 23, 2008
Messages
2,319
In GUI, you probably need to make a trigger
  • Events
    • Game - Every 0.1 second of the game time
  • Conditions
  • Actions
    • Game - Remove Text
    • Set Text = <Default>
    • Game - Create floating text above unit's head
    • Set Text = Last created floating text
You might be able to get it more smoothly and less laggy in JASS.
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,258
Inorder to make the update almost every frame (and thus 100% smooth as no frame has it in the same position), the text has to move every 0.01667 seconds (as the average FPS is 60). However in the new patch the FPS might be set higher or lower depending on the capabilities of the screen the user is using and sadly that number can not be fetched via triggers.

I would however recomend every 0.03 seconds or even 0.05 as the human eye is incapable of telling that it is not being rendered every frame. By increasing it to that number it uses less processor time and thus will make less lag when you use a complex spell or have a lot of background triggers running.

Remember that you are limated to at most 100 text tags (floating text) objects at once (after which the last created one will always be passed as the newly created one.
 
Level 8
Joined
May 25, 2008
Messages
125
Inorder to make the update almost every frame (and thus 100% smooth as no frame has it in the same position), the text has to move every 0.01667 seconds (as the average FPS is 60). However in the new patch the FPS might be set higher or lower depending on the capabilities of the screen the user is using and sadly that number can not be fetched via triggers.

I would however recomend every 0.03 seconds or even 0.05 as the human eye is incapable of telling that it is not being rendered every frame. By increasing it to that number it uses less processor time and thus will make less lag when you use a complex spell or have a lot of background triggers running.

Remember that you are limated to at most 100 text tags (floating text) objects at once (after which the last created one will always be passed as the newly created one.

yes i agree with that it's true but careful cuz it would cause more lag than normal even though u increase to that number so i won't really recommdend it if u don't want laggy game... like i said it's just a recommendation from me
 
Level 9
Joined
Jan 14, 2008
Messages
366
unless you need the text to change alot

the smoothest solution would be to create 2dimensional model attachments, in the form of whatever text you need, and attach them to the overhead of unit X.
 
Status
Not open for further replies.
Top