Forum Multiplayer Trouble Toggling Room Visibility

Discussion and help relating to the PlayerIO Multiplayer API.

Trouble Toggling Room Visibility

Postby Swoopjockey » March 4th, 2010, 11:59 am

Hey there,

I'm trying to toggle room visibility on/off depending on the number of players in the game and whether it has started.

Basically, I want rooms to hide from the lobby if there are 4 players or the game has already started.

Unfortunately, the rooms remain always visible despite me calling the Visible method from the API.
Here is my code:

Code: Select all
public override void UserJoined(Player player) {

            if (PlayerCount < 4 && gameStarted == false)
            {
         joinGame(player);
            }

            if (PlayerCount >= 4)
            {
                Visible = false;
            }


   }


Code: Select all
private void resetGame(Player user) {

....
            gameStarted = true;
            Visible = false;
            Broadcast("startGame");

....

      }


Any idea where I'm going wrong?
Swoopjockey
 
Posts: 21
Joined: February 5th, 2010, 2:17 pm

Re: Trouble Toggling Room Visibility

Postby Oliver » March 5th, 2010, 3:43 pm

Hi,

I'm very sorry to tell you that you ran into a bug in our systems.

The good news is that it's been fixed now, so you shouldn't have the issue anymore.

Sorry for the inconvenience.

Best,
Oliver
User avatar
Oliver
.IO
 
Posts: 1159
Joined: January 12th, 2010, 8:29 am

Re: Trouble Toggling Room Visibility

Postby Swoopjockey » March 6th, 2010, 12:18 am

Actually, that was the answer I was hoping for.

I was tired of beating my head against the wall :lol:

Thanks Oliver.
Swoopjockey
 
Posts: 21
Joined: February 5th, 2010, 2:17 pm


Return to Multiplayer