playMaker

Author Topic: PUN setup (Lobby + VS menu)  (Read 1425 times)

Budde88

  • Full Member
  • ***
  • Posts: 165
PUN setup (Lobby + VS menu)
« on: October 24, 2018, 02:31:57 PM »
Let me start off by saying that I have been able to create and join rooms with separate buttons, but I need a more tailored Multiplayer setup.

In my game players will select a room from the Lobby (Please see attached 'Lobby')

Next, players will be placed in a 'VS' Menu (Please see attached 'VS' Menu)

This is what I need help with:

1. Show player count in a specific room.
    Example: Room 1 player count = 63
                   Room 2 player count = 22

2. How to create and join a room with a single button.

Thanks :)

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: PUN setup (Lobby + VS menu)
« Reply #1 on: October 29, 2018, 06:27:44 AM »
Hi,

to get the number of players per room, you get that with the room infos inside the lobby. using the action PhotonNetworkGetNextRoomProperties after you received the photon event PHOTON / RECEIVED ROOM LIST and/or PHOTON / RECEIVED ROOM LIST UPDATE


For your button, you need to create the logic so that when you click once, you wait for connection and then join the room.

Bye,

 Jean