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,095
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