• 💀 Happy Halloween! 💀 It's time to vote for the best terrain! Check out the entries to Hive's HD Terrain Contest #2 - Vampire Folklore.❗️Poll closes on November 14, 2023. 🔗Click here to cast your vote!
  • 🏆 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!
  • 🏆 HD Level Design Contest #1 is OPEN! Contestants must create a maze with at least one entry point, and at least one exit point. The map should be made in HD mode, and should not be openable in SD. Only custom models from Hive's HD model and texture sections are allowed. The only exceptions are DNC models and omnilights. This is mainly a visual and design oriented contest, not technical. The UI and video walkthrough rules are there to give everyone an equal shot at victory by standardizing how viewers see the terrain. 🔗Click here to enter!

[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?
 

Bannar

Code Reviewer
Level 26
Joined
Mar 19, 2008
Messages
3,140
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