playMaker

Author Topic: Photon - Room Custom Property in lobby  (Read 19162 times)

escpodgames

  • Hero Member
  • *****
  • Posts: 687
    • Assets
Photon - Room Custom Property in lobby
« on: August 03, 2013, 06:41:54 AM »
Would I use a custom property to make the room closed to new players but still visible?

Example - 2 players are in-a room with a max of 4 players but one decides to not wait for the room to be full and hits a play button. Playing will need to lock the room off as a 2 player game) but other people can see it exists but cant join.

Would Custom properties be a good use for this?
« Last Edit: August 05, 2013, 05:51:32 AM by jeanfabre »

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Photon - Room Custom Property
« Reply #1 on: August 05, 2013, 05:51:17 AM »
Hi,

 Ok, It requires an advanced room creation action. It will be available in the next release, anf for now I have attached it here so you can start.

basically, you need to define what custom properties will be visible in the lobby. that advanced room creation also lets you define custom props ( instead of having to set them manually after).

so in your case:

1: create an advanced room
2: set a custom boolean property like "Free" and set it to true
3: also add an entry in the "Lobby custom properties" and set it to "Free" ( so that the custom boolean property you declare becomes available in the lobby)

now when you iterate rooms when you are in the lobby using the action "Photon Get Next Room Properties", you can query for the custom property "Free"

It's indeed a VERY powerful feature.

 Have a go and let me know how it goes.

bye,

 Jean

bye,

 Jean

escpodgames

  • Hero Member
  • *****
  • Posts: 687
    • Assets
Re: Photon - Room Custom Property in lobby
« Reply #2 on: August 05, 2013, 06:06:12 AM »
Awesome, will give it ago tomorrow morning asap!!! thanks for the advanced features :D

Dev_Sebas

  • 1.2 Beta
  • Sr. Member
  • *
  • Posts: 398
    • Blog
Re: Photon - Room Custom Property in lobby
« Reply #3 on: August 05, 2013, 10:31:09 AM »
Thank you Jean! :D
Cheers
Seb

escpodgames

  • Hero Member
  • *****
  • Posts: 687
    • Assets
Re: Photon - Room Custom Property in lobby
« Reply #4 on: August 06, 2013, 11:28:56 AM »
Been solving other issues all day :S

I know we can set a players name but is there a way to see if a player with a name is online (currently in a room OR just playing the app?) Is there a way to use PhotonViewGetOwnerProperties to do this?

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Photon - Room Custom Property in lobby
« Reply #5 on: August 07, 2013, 05:11:19 AM »
Hi,

 I am not sure actually. I know Photon has a "friend" list system, so this may be what you are looking for actually.

I'll enquire and get back to you.

bye,

 Jean

escpodgames

  • Hero Member
  • *****
  • Posts: 687
    • Assets
Re: Photon - Room Custom Property in lobby
« Reply #6 on: August 08, 2013, 04:42:42 AM »
Hey Jean,

Just to let you know, the advanced room custom properties works a treat! So awesome!

Thanks heaps :D

Andrew

Bqlqzs

  • Junior Playmaker
  • **
  • Posts: 52
Re: Photon - Room Custom Property in lobby
« Reply #7 on: March 13, 2014, 10:42:45 AM »
How its work??
I can set the custom property in room, but how can I set up my room list with propertys?

I used this action: PhotonGUILayoutToolbarWithRooms
This is create a simple list.. ok.

But how to use the PhotonNetworkGetNextRoomProperties for the list?


anybody have a sample image for room list with propertyes?

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Photon - Room Custom Property in lobby
« Reply #8 on: March 14, 2014, 06:45:31 AM »
Hi,

 Can you give a use case? I am no sure what you are trying to do here.

bye,

 Jean

Bqlqzs

  • Junior Playmaker
  • **
  • Posts: 52
Re: Photon - Room Custom Property in lobby
« Reply #9 on: March 14, 2014, 11:29:25 AM »
I need full help...
As I writed, I dont know, how can I use the PhotonNetworkGetNextRoomProperties?

I cant find any normal help...
the wiki (https://hutonggames.fogbugz.com/?W1115)
 is not write any normal info... just say what can do this action,
 but how can I use this? how its work with room list action?

I want use this action for get room property and hide the locked rooms on room list because you said:
 "now when you iterate rooms when you are in the lobby using the action "Photon Get Next Room Properties", you can query for the custom property "Free""
« Last Edit: March 16, 2014, 05:32:36 AM by Bqlqzs »

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Photon - Room Custom Property in lobby
« Reply #10 on: March 18, 2014, 09:41:23 AM »
Hi,

 roomList actoin is something completlly separated from room properties, Room list action simply list available rooms, if you want to get a property for a given room or all rooms, then you have to iterate trhought them manually.

 Is this statement above make sense? it's important before I explain further.

bye,

 Jean

Bqlqzs

  • Junior Playmaker
  • **
  • Posts: 52
Re: Photon - Room Custom Property in lobby
« Reply #11 on: March 18, 2014, 10:54:27 AM »
Hi,

 roomList actoin is something completlly separated from room properties, Room list action simply list available rooms, if you want to get a property for a given room or all rooms, then you have to iterate trhought them manually.

 Is this statement above make sense? it's important before I explain further.

bye,

 Jean

So, need to get full room list, and after add to property for all room? or what and how?

Can you create a print screen about the room list with hide propertyes?

(because you use some words, what I cant translate with google.. -.- example "iterate")

One picture can say more than chat over 1 week on the forum...
and I think this image will be good help if take on the playmaker wiki for "PhotonNetworkGetNextRoomProperties" I think not im the one who cant understand this action.
« Last Edit: March 18, 2014, 11:00:10 AM by Bqlqzs »

Bqlqzs

  • Junior Playmaker
  • **
  • Posts: 52
Re: Photon - Room Custom Property in lobby
« Reply #12 on: March 21, 2014, 04:29:35 AM »
What are the necessary steps to work this action?

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Photon - Room Custom Property in lobby
« Reply #13 on: March 25, 2014, 07:53:32 AM »
Hi,

 preparing a sample, allow me few days to send it over.

bye,

 Jean

Bqlqzs

  • Junior Playmaker
  • **
  • Posts: 52
Re: Photon - Room Custom Property in lobby
« Reply #14 on: March 26, 2014, 12:21:06 PM »
Hi,

 preparing a sample, allow me few days to send it over.

bye,

 Jean

If my translate is good, you will make one example for this? If yes, Im waiting.
Thank you

(But I really said, that some difficult actions need more informaiton on playmaker wiki, because the wiki not write, how can use, just that what can do and this is not enough
If you or playmaker havent time to write more info on to wiki, I can help and write some +info, if you want.)