Playmaker Forum

PlayMaker Help & Tips => PlayMaker Help => Topic started by: escpodgames on August 03, 2013, 06:41:54 AM

Title: Photon - Room Custom Property in lobby
Post by: escpodgames 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?
Title: Re: Photon - Room Custom Property
Post by: jeanfabre 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
Title: Re: Photon - Room Custom Property in lobby
Post by: escpodgames on August 05, 2013, 06:06:12 AM
Awesome, will give it ago tomorrow morning asap!!! thanks for the advanced features :D
Title: Re: Photon - Room Custom Property in lobby
Post by: Dev_Sebas on August 05, 2013, 10:31:09 AM
Thank you Jean! :D
Cheers
Seb
Title: Re: Photon - Room Custom Property in lobby
Post by: escpodgames 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?
Title: Re: Photon - Room Custom Property in lobby
Post by: jeanfabre 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
Title: Re: Photon - Room Custom Property in lobby
Post by: escpodgames 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
Title: Re: Photon - Room Custom Property in lobby
Post by: Bqlqzs 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?
Title: Re: Photon - Room Custom Property in lobby
Post by: jeanfabre 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
Title: Re: Photon - Room Custom Property in lobby
Post by: Bqlqzs 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""
Title: Re: Photon - Room Custom Property in lobby
Post by: jeanfabre 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
Title: Re: Photon - Room Custom Property in lobby
Post by: Bqlqzs 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.
Title: Re: Photon - Room Custom Property in lobby
Post by: Bqlqzs on March 21, 2014, 04:29:35 AM
What are the necessary steps to work this action?
Title: Re: Photon - Room Custom Property in lobby
Post by: jeanfabre on March 25, 2014, 07:53:32 AM
Hi,

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

bye,

 Jean
Title: Re: Photon - Room Custom Property in lobby
Post by: Bqlqzs 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.)
Title: Re: Photon - Room Custom Property in lobby
Post by: jeanfabre on April 04, 2014, 08:19:40 AM
Hi,

 ok, actually, the demo is already featuring a working sample on this.

1: check "Menu:Create Room" Fsm

 the "Photon network Create Room Advanced" is set to show the "free" room property in the lobby.

 so you define the "free" custom property, and then also list it in the Lobby Custom property" for it to be visible in lobby.

2: check "Menu: room list iteration"

the "iterate each room" does check for the "free" cusotm property, and then in the "do something with the room properties" state, you do whatever you want with it.

and that's about it really.

 Does that make sense? basically->

1: create room properties
2: make them available in the lobby
3: iterate trhough rooms when a room list is updated to get the room properties ( explicitly exposed to the lobby)


bye,

 Jean
Title: Re: Photon - Room Custom Property in lobby
Post by: Bqlqzs on April 08, 2014, 07:19:01 AM
I can set the room custom property and ect.
I dont know, how can I create the room list with custom propertyes,
I dont know how to use the "PhotonNetworkGetNextRoomProperties" action

so my problem is that I cant find example or good help for how to use this action.

the room list...
Title: Re: Photon - Room Custom Property in lobby
Post by: jeanfabre on April 08, 2014, 07:42:37 AM
Hi,

 do you have this sample?

https://hutonggames.fogbugz.com/default.asp?W928

In there ( as my previous post explains), you'll find a working sample of how to set a custom room property, define as as visible on the lobby and how other instances can read that lobby visible room property.

Have you checked the fsm I mention? what's in there that you don't understand or can't reproduce in your own project?

If you can set room custom property, then your room list will have these properties., you don't "Create" a room list, it's photon that give it to you as you create more and more rooms. Does that make sense?

"PhotonNetworkGetNextRoomProperties" is used in ""Menu: room list iteration" Fsm, have you checked it?


bye,

 Jean
Title: Re: Photon - Room Custom Property in lobby
Post by: Bqlqzs on April 10, 2014, 03:04:32 AM
Hi,

 do you have this sample?

https://hutonggames.fogbugz.com/default.asp?W928?

In there ( as my previous post explains), you'll find a working sample of how to set a custom room property, define as as visible on the lobby and how other instances can read that lobby visible room property.

Have you checked the fsm I mention? what's in there that you don't understand or can't reproduce in your own project?

If you can set room custom property, then your room list will have these properties., you don't "Create" a room list, it's photon that give it to you as you create more and more rooms. Does that make sense?

"PhotonNetworkGetNextRoomProperties" is used in ""Menu: room list iteration" Fsm, have you checked it?


bye,

 Jean

You linked this: https://hutonggames.fogbugz.com/default.asp?W928?

but this is the basic wiki...
I think you want to link a sample

If you want to link the demo worker, at latest time, when I checked the demo used the simple room list.

I think If I can see a normal example for how to use the *** "PhotonNetworkGetNextRoomProperties" action, maybe can solve this.

And I think, we not talk about this  over 1 month or more, if you or anybody can put one image example here or on the action wiki page ... (cuse I think the wiki is for help... not just write the same info, what everybody can read and think.)
But ok waste more time... sorry but I cant figure out normal this in english language..

https://hutonggames.fogbugz.com/?W1115
This site does not contain enough information for use ,just shows the already visible inscriptions, but HOW to use? this is not specified in
Title: Re: Photon - Room Custom Property in lobby
Post by: jeanfabre on April 10, 2014, 04:34:30 AM
:)

 I edited the link, basically, having put a "?" at the end corrupted the whole link...

https://hutonggames.fogbugz.com/default.asp?W928

this one will work!, in there you^ll find the link to download the sample for this. and then you can finally follow the instruction I gave few posts earlier on this thread.

bye,

 Jean
 
Title: Re: Photon - Room Custom Property in lobby
Post by: Bqlqzs on April 14, 2014, 05:21:21 PM
:)

 I edited the link, basically, having put a "?" at the end corrupted the whole link...

https://hutonggames.fogbugz.com/default.asp?W928

this one will work!, in there you^ll find the link to download the sample for this. and then you can finally follow the instruction I gave few posts earlier on this thread.

bye,

 Jean

I found it, Thank you
Title: Re: Photon - Room Custom Property in lobby
Post by: jeanfabre on April 15, 2014, 10:08:34 AM
Hi,
 

Great. Keep us updated on your progress.

bye,

 Jean