playMaker

Author Topic: Photon - Room Management[SOLVED]  (Read 4246 times)

app_advisory

  • Junior Playmaker
  • **
  • Posts: 80
    • App Advisory
Photon - Room Management[SOLVED]
« on: September 30, 2014, 03:03:12 PM »
Hi,

I really don't understand how I can check if a room is full or not (I'm ok with that) and if not, create a new room.
And If a new player comes, he gonna find the first room full and I want to connect this user to the new room I just created (that's my problem).

How can I do that ?


I think it should be better with more details :

I fact I have 2 levels : Map1 and Map2.


If there is no player, and a player comes and choose the Map1, a new room "Map1" is created.

Map1 can have just 4 players insides.

If Map1 is full, I would like to create a Map1_1. But how the new players can be redirected to this map ?

Thanks a lot !

Best regards,

AB
« Last Edit: October 20, 2014, 06:51:05 AM by jeanfabre »

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15594
  • Official Playmaker Support
Re: Photon - Room Management
« Reply #1 on: October 20, 2014, 03:11:59 AM »
Hi,

 you need to use "Get Next room Properties", this will iterate through each rooms ( ONLY WORKS IN THE LOBBY), and you can check for a specific index, or build with ArrayMaker an hashtable of names/player count

then you can know if a particular room is full.

Typically, I would run such procedure by implementing the global event "PHOTON / RECEIVED ROOM LIST" and "PHOTON / RECEIVED ROOM LIST UPDATE", just like in the demo.

have you tried that already?

 Bye,

 Jean

app_advisory

  • Junior Playmaker
  • **
  • Posts: 80
    • App Advisory
Re: Photon - Room Management
« Reply #2 on: October 20, 2014, 05:04:42 AM »
Ho sorry I did that and it works thank you !

I made this game with this :


Thanks for your precious help !

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15594
  • Official Playmaker Support
Re: Photon - Room Management[SOLVED]
« Reply #3 on: October 20, 2014, 06:51:25 AM »
Hi,

 Very good!

 Bye,

 Jean