- Joined
- Jun 30, 2006
- Messages
- 230
As I've mentioned in several posts, I've been trying to convert anything I can to GUI for readability and so that anyone can edit it whether they know JASS or not.
I'm trying to create two forces, Alliance and Horde, but only add the players who are playing, to do this you use GetPlayerSlotState().
In JASS it is easy:
But for GUI, I cannot find a way to see if the player is playing or not. Is this not possible?
I'm trying to create two forces, Alliance and Horde, but only add the players who are playing, to do this you use GetPlayerSlotState().
In JASS it is easy:
JASS:
function Forces takes nothing returns nothing
local integer c = 0
set udg_Alliance = CreateForce()
set udg_Horde = CreateForce()
loop
exitwhen c > 4
if ( GetPlayerSlotState(Player(c)) == PLAYER_SLOT_STATE_PLAYING ) then
call ForceAddPlayer( udg_Alliance, Player(c) )
endif
if ( GetPlayerSlotState(Player(c + 5)) == PLAYER_SLOT_STATE_PLAYING ) then
call ForceAddPlayer( udg_Horde, Player(c + 5) )
endif
set c = c + 1
endloop
endfunction
But for GUI, I cannot find a way to see if the player is playing or not. Is this not possible?