• 🏆 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!

Hide Floating Text

Status
Not open for further replies.
Level 8
Joined
Dec 9, 2009
Messages
397
I'm trying to hide floating text for everyone except the owner of unit, Is there an easy way? I can't find the right thing (GUI).
 
Level 37
Joined
Mar 6, 2006
Messages
9,240
  • Untitled Trigger 136
    • Events
    • Conditions
    • Actions
      • Floating Text - Create floating text that reads rhhdfg at (Center of (Playable map area)...
      • Floating Text - Hide (Last created floating text) for (All players)
      • Custom script: if GetLocalPlayer() == GetTriggerPlayer() then
      • Floating Text - Show (Last created floating text) for (Player group((Triggering player)))
      • Custom script: endif
This would show it for triggering player for example.

It leaks a force and location. http://www.hiveworkshop.com/forums/triggers-scripts-269/things-leak-35124/
 
Level 26
Joined
Aug 18, 2009
Messages
4,097
Are you serious about creating a force in the local block? Then it should be killed in same right away to not cause a desync. But you do not need the local block.

JASS:
function ShowTextTagForceBJ takes boolean show, texttag tt, force whichForce returns nothing
    if (IsPlayerInForce(GetLocalPlayer(), whichForce)) then
        // Use only local code (no net traffic) within this block to avoid desyncs.
        call SetTextTagVisibility(tt, show)
    endif
endfunction
 
Level 8
Joined
Dec 9, 2009
Messages
397
Not sure what you mean by Force, and I don't know what to change in that custom script for, owner of unit, the trigger isn't triggered by a player or even a unit. It's being set by a variable.

owner of unit(Unit variable)
 
Level 8
Joined
Dec 9, 2009
Messages
397
What part could cause Desync? is this not a good way to do it?

Ok, I did it, I assume though, I don't have another player to test atm

  • Set PlayerGroup = (Player group((Owner of TempUnit)))
  • Floating Text - Hide (Last created floating text) for (All players)
  • Floating Text - Show (Last created floating text) for PlayerGroup
 
Last edited:
Status
Not open for further replies.
Top