Nestharus
o-o
- Reaction score
- 84
uh... i know there are 2 or 3 scripts to check if game is single player, but here's the best method I think..
=P
JASS:
=P
I believe the going method to detect if a game is single player is [LJASS]ReloadGameCachesFromDisk()[/LJASS].
set bj_isSinglePlayer = false
set userControlledPlayers = 0
set index = 0
loop
exitwhen index >= bj_MAX_PLAYERS
if (GetPlayerController(Player(index)) == MAP_CONTROL_USER and GetPlayerSlotState(Player(index)) == PLAYER_SLOT_STATE_PLAYING) then
set userControlledPlayers = userControlledPlayers + 1
endif
set index = index + 1
endloop
set bj_isSinglePlayer = (userControlledPlayers == 1)