• 🏆 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!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

Small Floating Txt Problem

Status
Not open for further replies.
Level 8
Joined
Feb 17, 2007
Messages
368
It seems when I create floating text at map init, it's visible even when the players camera isnt even close to the region with the text, or in visibility range. Yet, it still is viewable when panning the camera to the right, and directly in front of the hero for selection. How do I make it so this isn't viewable to players who aren't near it?



 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,207
Firstly, try waiting a small delay before creating it as running stuff on map initialization that is graphic can cause bugs (as the rendering has not started yet).

You can hide/show floating text to players locally via the GetLocalPlayer() native which returns the player of the machine who executes it (different player for each human in the game).
 
Status
Not open for further replies.
Top