How to make player a referee?

Status
Not open for further replies.
Level 5
Joined
Nov 27, 2007
Messages
85
I can turn player into observer... But how do I set the player state to "referee"?
(EXPLANATION: referee is an observer that can chat with normal players; by default observers can only chat with other observers).

The best I could find is this:
JASS:
native SetPlayerState takes player whichPlayer, playerstate whichPlayerState, integer value returns nothing

Which is used like:
JASS:
// make player an observer (NOT referee)
call SetPlayerState( p, PLAYER_STATE_OBSERVER, 1 )
 
Level 5
Joined
Nov 27, 2007
Messages
85
Hmm, my map is 12-player map, and I can't afford to have an additional slot specifically for observing players.
Is there any way to make player a referee inside the game?
For example, the player types -ref and instantly becomes a referee.
 
Level 26
Joined
Aug 18, 2009
Messages
4,097
I think you can have an empty force, so you need no slot. But you do not require a force either. Just do as if the player would be some kind of referee by adjusting features for it, as Pharaoh_ mentioned granting them sight or resetting the alliances to other players. You can even turn their color to white and maybe prefix them by "Referee".

call SetPlayerName(<player>, "|cffffffff (Referee) " + GetPlayerName(<player>) + "|r")
 
Last edited:
Level 5
Joined
Nov 27, 2007
Messages
85
Thanks, this is just the solution to my problem.
The white color makes it the message look like it comes from an observing player.
JASS:
call SetPlayerName(p, "|cffffffff" + GetPlayerName(p) + "|r")
 
Status
Not open for further replies.
Top