| 05-20-2010, 05:17 AM | #1 |
If i want to create a floating text for GetLocalPLayer()... does it desync? or there is a safer way to create a floating text for only 1 player? |
| 05-20-2010, 06:23 AM | #2 |
you can create a floating text for one player only, but you have to make sure that the actual floating text handle exists for every player... so what you can do is: create the floating text in a place noone can see (for ALL players), move the text to the desired position for LocalPlayer only and make sure that the texttag is destroyed for all players afterwards. |
| 05-20-2010, 06:47 AM | #3 |
Or you could fade the text-tag so that it is completely transparent for all the players except the one you want it to be visible to. |
| 05-20-2010, 07:10 AM | #4 |
SetTextTagVisibility(<texttag>,(GetLocalPlayer()==<player>)) |
| 05-20-2010, 01:28 PM | #5 |
You can even create a textag locally, it's a pseudo handle, it won't desync. Which is handy because of the limit of 100 textags simultaneously. 100 is not a high limit so 100/12 would be very lame ... |
| 05-20-2010, 03:25 PM | #6 |
can you show me that in code troll-brain? (Im a guier). In JASS is ok, i can understand some. so far this Trigger: ![]() custom script : if (not (GetTriggerPlayer() == GetLocalPLayer())) then![]() set : visibility = 0.0![]() Custom Script : else Visibility = 100.0![]() custom script : endif![]() ...![]() Show and destroy the floating text.(or something like this. But i got the idea :P (im at work now)) seems the easier solution to implement in GUI :P |
| 05-20-2010, 04:48 PM | #7 |
No the easiest solution in GUI is that : Create a player variable name "LocalPlayer", and make this trigger in the top : Trigger: Then you can simply use the variable LocalPlayer. But care it opens the way of de-synchronisation, don't create handles (for example locations), use waits and other things inside a such block. But i repeat myself you can create a textta locally though. Here is an example of texttag creation for player red only : |
| 05-20-2010, 08:43 PM | #8 |
Thank you very much troll-brain. i was thinking in doing something like that, but i thought it might desync something like Trigger: just like you said :) thanks =D |
