ExpectedRoomProperties with multiple possible values?

Options
Hey guys!
I would like to know if it is possible to give multiple values to expected room properties? I tried this (RoomState):

private bool JoinRandomRoom()
{
return PhotonNetwork.JoinRandomRoom(new Hashtable
{
{RoomPropertyKeys.RoomState, RoomConfiguration.RoomState.Lobby | RoomConfiguration.RoomState.Match},
{RoomPropertyKeys.PIN, ""}
}, 0);
}
But it did not seems to work.

Actually there is a second question: Is it possible to ask if a room has the property in this example?. I gave the property "PIN" to all rooms, because i did not know how to ask on this place if the room as a pin set as custom property or not.

Comments

  • JohnTube
    JohnTube ✭✭✭✭✭
    edited May 2020
    Options
    Hi @VRNerd,

    Thank you for choosing Photon!

    In random matchmaking based on expected lobby properties you need to match the exact values and those properties need to exist in the room and their keys need to be marked as lobby properties (visible to the lobby).
    You can't have multiple values to choose from.
    You may want to consider SQL lobby for this and use SQL filters.

    If you want to match with rooms that do have a certain property key then its value need to match as well.
  • VRNerd
    Options
    Ah I see, I did not think about SQL filters! Thanks!
  • VRNerd
    VRNerd
    edited May 2020
    Options
    JohnTube wrote: »
    Hi @VRNerd,

    Thank you for choosing Photon!

    In random matchmaking based on expected lobby properties you need to match the exact values and those properties need to exist in the room and their keys need to be marked as lobby properties (visible to the lobby).
    You can't have multiple values to choose from.
    You may want to consider SQL lobby for this and use SQL filters.

    If you want to match with rooms that do have a certain property key then its value need to match as well.

    Once again me, do Custom properties has to be called like "C0" up to "C9" in SQL Filtering? And are they then limited to 10? Thanks for the fast response!

    Edit: I already found the answer in your documentation haha. Have a good day!