Waiting for player to reconnect

Options
I want to implement a mechanism such that every time a player is disconnected (internet is off during game), the photon server immediately removes him from the game. I want to start a 60 secs timer before removing him, such that the player can reconnect in those 60 secs, and after that time the player is removed from the game

Thanking you in advance

Comments

  • JohnTube
    JohnTube ✭✭✭✭✭
    Options
    Hi @DarthMat,

    Thank you for choosing Photon!

    This use case is supported out of the box in Photon, by the server in the room logic directly.
    A player can disconnect and become inactive in the room (remain in the actors list) for a period of time (limited to unlimited) then it can potentially be removed or leave for good.

    RoomOptions.PlayerTtl is what you need.
    Set it to 60000 (milliseconds) when creating rooms and you will get the behaviour you want.