Playmaker Forum

PlayMaker Feedback => Action Requests => Topic started by: app_advisory on September 30, 2014, 03:03:12 PM

Title: Photon - Room Management[SOLVED]
Post by: app_advisory 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
Title: Re: Photon - Room Management
Post by: jeanfabre 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
Title: Re: Photon - Room Management
Post by: app_advisory 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 !
Title: Re: Photon - Room Management[SOLVED]
Post by: jeanfabre on October 20, 2014, 06:51:25 AM
Hi,

 Very good!

 Bye,

 Jean