| 04-13-2009, 01:36 PM | #1 |
I was wondering if anybody knows how to hide a text tag that appears at one place if that place is in fog of war? For example, a text tag appears right above a specific unit but it is fogged for Player 3. How can I make the texttag NOT show for Player 3? |
| 04-13-2009, 01:46 PM | #2 |
JASS:
if ( IsVisibleToPlayer(x, y, GetLocalPlayer()) == false ) then
call SetTextTagVisibility(texttag, false)
endif
|
| 04-13-2009, 03:32 PM | #3 |
blizz should do the following for the TT native AddLightning takes string codeName, boolean checkVisibility... to the example above... you need do it periodicaly to achive needed result. the other way is to create TT localy but well... it's not the same. i also "suffer" from this problem. |
| 04-14-2009, 03:58 PM | #4 |
I'm pretty sure you can make texttags only appear to indvidual player(s) or groups of them (aka a force). Here's how I did it (may not be the best way but it works). Well, I used the BJ "ShowTextTagForceBJ" which takes a boolean (show or don't (true or false)), a texttag, and a force. Of course, if you don't want to use the BJ, just break it down and see how Blizz did it. It's pretty easy. |
| 04-14-2009, 04:12 PM | #5 | |
Quote:
ShowTextTagForceBJ only checks if local player is in the force and hides the tt if so. So when you add the visibility check part you should get a similar code like then one i posted yetserday |
| 04-14-2009, 09:54 PM | #6 |
Simply loop through players, and locally check if the location is visible, if it is than make the text visible, otherwise hide it. |
| 04-14-2009, 10:15 PM | #7 | |
Quote:
|
| 04-14-2009, 11:04 PM | #8 | |
Quote:
If the visibility is checked locally than there will be same amount of work done. And if lets say a person isn't an ally, than you will have to check visibility again, and than loop through his allies again. |
| 04-14-2009, 11:09 PM | #9 | |
Quote:
Of course, this is under the assumption these texttags are dynamic and temporary; miss texttags, for example. If they're long-lasting/need to stay, then that's different. |
| 04-15-2009, 01:42 AM | #10 | |
Quote:
|
