Can a player join a room from a room?

Currently implementing friend invites. Right now a player can invite their friends to play with them, this works by:

1. The player sending invite to a friend (through Photon Chat)
2. If that was the first invite to be sent then generate a random room name and create a room with that room name (then join it - this room is only to be used a staging room)
3. Otherwise, also send friend room name
4. If friend accepts invite then have friend join room (using the room name sent by the player)
5. When ready, the player calls JoinRandomRoom (with slot reservation) so that the player and their friends can find a game to play.

This is where I get an error: Client is not on Master Server or not yet ready to call operations. I figure that this error occurs because I am no longer in a lobby (and therefore can't join a room?). Is there a way around this? partially one where I can join another room from a room - An alternative I thought of is sending they player (room owner) back to the lobby then calling JoinRandomRoom (with slot reservation).

Comments

  • Found that sending the player (room owner) back to the lobby then calling joinRandomRoom seems to be working well.
Sign In or Register to comment.