- Joined
- May 4, 2007
- Messages
- 2,260
Guys, I have one question .... How do I display a String message for only one player, without using GroupForces ???
if GetLocalPlayer() == GetOwningPlayer(yourUnit) then
// show message
endif
local player p = GetOwningPlayer(GetTriggerUnit())
local player t = GetLocalPlayer()
set t = p !??
if GetLocalPlayer() == Your Player then
// put all actions here
if GetLocalPlayer() == p then
"hello friends !!"
endif
call DisplayTextToPlayer(Player(p), 0, 0, "I just display to 1 player!")
... But BJDebugMsg will show up to all player rit ?
Besides how can I write a function to only 1 player ??
Anyway, I may use a groupforce, it seems the best way to do it ...
function func takes player p returns nothing
call DisplayTextToPlayer(p, 0, 0, "I just display to player p!")
endfunction
function func takes player p returns nothing
function func takes integer p returns nothing
Use the GetLocalPlayer action.
If for example you want to show it for a owner of a unit, make a line like this:
.JASS:if GetLocalPlayer() == GetOwningPlayer(yourUnit) then // show message endif
*thanks to Need_O2 again ^^*