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

[Trigger] Floating Text Following Unit

Status
Not open for further replies.
Level 6
Joined
Jun 24, 2011
Messages
176
Part of Init Trigger:
  • Floating Text - Create floating text that reads |cff00ff00l l l l l... at MCI_Point[1] with Z offset 160.00, using font size 10.00, color (100.00%, 100.00%, 100.00%), and 0.00% transparency
  • Set MCI_Float[1] = (Last created floating text)
  • Floating Text - Change MCI_Float[1]: Aktivieren permanence
  • Magazine Count Indicator Loop
    • Events
      • Time - Every 0.02 seconds of game time
    • Conditions
    • Actions
      • Set MCI_Point[1] = (Position of u)
      • Floating Text - Change the position of MCI_Float[1] to MCI_Point[1] with Z offset 160.00
      • Floating Text - Change text of MCI_Float[1] to |cff00ff00l l l l l... using font size 10.00
      • Custom script: call RemoveLocation(udg_MCI_Point[1])
I create a floating text that indicated the current bullet count in the Magazine, dont worry about the display text, that is to be changed later.

Now my question, is this appropriate? Will it cause heavy lags when using 0.02 seconds?
Is there a better way to create a floating text following a Unit?
 
It won't cause much lag unless you forgot about removing locations are destroying other leaks. Some time ago I've created bar mini system and it creates a mana and health bar for multiple units, so if your trigger summons just few don't worry about spikes. Remember though that you can have only 100 floating texts at a time on map.

Recomending to change loop to 0.03 althought.
 
Status
Not open for further replies.
Top