LeaveRoom()

Type
Function

Description

This function removes your client from the room it is in to your private room with the same name/id as your client id. So if your client id is 48 you are put into the room with id “48”. Nobody else can join this room so you are “alone”.

📌
This function isn’t exactly “leave room” because you still are technically in a room but no one else has access to this room so it is the equivalent of being in no room.

How do I know I’ve left room succesfully?

After a successful connection/joining your server the callback function callback_LeaveRoom() is called. So under Scripts/Rocket Networking/Callback Functions , you can edit this to do whatever you want…

Example Implementation of callback

image
  • Here I’ve just done a show_message so the user is shown a dialog box with that message but you get the idea