Enter and cancel the queue
Other players get the error
NOT_HOST.
A lobby in the queue is only matched while at least one of its players has been seen within the last 45 seconds. A player with an open event stream counts as seen.
OnQueueCancelled gives a reason. It can be timeout, queue_disabled, billing_locked, plan_changed, no_build_for_version or server_failed. The reason is empty when the host cancels.
When a match is found
OnMatchFoundfires. It has the match ID and the queue ID. The server is not ready yet.- Simpl starts the server.
OnServerReadyfires with the host and the port. The plugin only fires it when the server has a port namedgame.- Connect to that address. Call
TravelToServer(Host, Port), orTravelToLobbyServer()to use the lobby’s server.
TravelToServer returns true when travel started. That does not mean the player connected.
To learn how addresses work, see Connect players.
The whole flow in C++
This sample initializes the plugin, creates a lobby, listens for the server, enters the queue, and shuts down.HandleServerReady must be declared with UFUNCTION() in your header.
ShutdownSimpl leaves the lobbies you are in. OnShutdownComplete tells you when it is done. It is available in C++ only.