• 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.
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!
  • ✅ The POLL for Hive's Texturing Contest #34 is OPEN! Vote for the TOP 3 SKINS! 🔗Click here to cast your vote!
  • ✅ The POLL for Hive's Techtree Contest #20 is OPEN! Vote for the TOP 3 FACTIONS! 🔗Click here to cast your vote!

How to make a floating text stay above a unit

Status
Not open for further replies.
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.
 
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.
 
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
 
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.
Back
Top