I need information of the player that left the room

When a player left a room, the host triggers leaveRoomEventAction that provides the playerNr but is there a way to access the player to get somethings like his name of his customProperties ? or is there somewhere that I can know that this player will leave the room and then I can store the information I need ?

Comments

  • Hi @benjaml.

    Once the player has left the room for good (and not just left temporarily as in calling opLeaveRoom() with 'willComeback' set to 'true'), his presence in the them gets cleaned up completely immediately and you don't have any way to access any information about him any longer, as such information simply does not exist any longer.
    If you need to access certain information about a player even after he is gone, then simply don't wait with storing it until he leaves the room, but store it locally as soon as it becomes available (so for the players name - when you get the join event for that player (when he joins after you) or the join response for your own player (when he has joined before you) ) and override affected parts of your local information with new information as soon as you receive updates about changes to certain parts of the information.
Sign In or Register to comment.