| 01-09-2006, 11:25 PM | #1 |
Can i safely locally define a real value in a multiplayer map without server splits? My purpose is that I want to create a floating text that appears red to the defender and blue for the attacker. Thx |
| 01-09-2006, 11:35 PM | #2 |
You can't create floating texts local, but you can hide/show them. Then create 2 floating texts use GetLocalPlayer() to show/hide them. |
| 01-09-2006, 11:36 PM | #3 |
Ya but i was thinking that instead of creating two different floating texts, i could use a locally defined real value(s) to represent the rgb values of a single floating text. |
| 01-09-2006, 11:52 PM | #4 | |
Quote:
erm, how? :-/ a local variable is a variable to local to a function. (a trigger) not a player. theirfore, how would you use a local real variable to define diffrent text colours without the use of getlocalplayer? |
| 01-10-2006, 02:57 AM | #5 |
I think he meant local as in for the local player. And I think that it might even work without server splits. JASS:local real r if GetLocalPlayer() == whichPlayer then set r = 0 else set r = 255 endif set t = CreateTextTag(......., r) You will have to try this on bnet to see if it really doesn't desync but i think chances are good. |
| 01-10-2006, 12:39 PM | #6 |
This would also work with different textmsg and even with different positions on the screen I think. Better performancewize maybe? :P |
| 01-10-2006, 05:45 PM | #7 |
JASS:native SetTextTagColor takes texttag t, integer red, integer green, integer blue, integer alpha returns nothing You might be able to use this locally :) |
