- Joined
- Oct 11, 2012
- Messages
- 711
Hi guys, is it possible to only show destructables to one player? I guess it is possible? But even it is possible, I am still confused about the GetLocalPlayer() function.
So, how to correctly use the GetLocalPlayer() function? Many thanks.
JASS:
function con takes nothing returns boolean
if GetTriggerPlayer() == GetLocalPlayer() then //This comparison must be wrong...
.... //Showing destructables
endif
return false
endfunction
//===========================================================================
function InitTrig_test takes nothing returns nothing
local trigger t = CreateTrigger()
local integer i = 0
loop
exitwhen i > 7 // There are only 8 players in my map.
call TriggerRegisterPlayerEvent(t, Player(i), EVENT_PLAYER_END_CINEMATIC)
set i = i + 1
endloop
call TriggerAddAction(t, function con)
endfunction
So, how to correctly use the GetLocalPlayer() function? Many thanks.