if GetLocalPlayer() == Player(0) then
local texttag TextTag = CreateTextTag()
//Your Actions
SetTextTagVisibility
Using GetLocalPlayer is right though. You could also useSetTextTagVisibility
Good point.Creating them locally is better since you can create them without any problems. Also, the floating text counter will only increase on the PC on which that texttag was created, thus the other players have more available. (Remember the limit of 100?)
private function Create takes nothing returns nothing
local texttag TxtTag
if GetLocalPlayer() == Player(0)
set TxtTag = CreateTextTag
//Your Actions
endif
endfunction
Better but you forgot the then. =PIs this better for your tastes?
JASS:private function Create takes nothing returns nothing local texttag TxtTag if GetLocalPlayer() == Player(0) set TxtTag = CreateTextTag //Your Actions endif endfunction
so...is this possible?
JASS:function im_cute takes nothing returns nothing local texttag t local player p = GetOwningPlayer(GetTriggerUnit()) if GetLocalPlayer() == p then set t = CreateTextTag() //actions.. endif endfunction
We'll hope that someone( Jesus4Lyf, Azlier, Cohadar, These vJASS Gods ) can make a safe GetLocalPlayer.
hook
to the native and calling a debug message each time it is used. [That way, you can check when it is used easily and quickly coding-wise]