Kronos Matchmaking
Buy NowContact
  • About
    • Kronos LTS
    • Support
    • Accolades
  • Examples
    • Playable Demo
    • Sample Project
    • Example Content
  • Configuration
  • Testing & Debugging
  • Usage
    • Getting Started
    • Authentication
      • Authenticating Users
      • Customizing The Auth Widget
      • Creating Custom Auth Tasks
    • Matchmaking
      • Overview
      • Creating Matches
      • Starting Matchmaking
      • Canceling Matchmaking
      • Using Skill Ratings
      • Sending Match Invites
      • Joining Matches
      • Leaving Matches
    • Party
      • Overview
      • Creating Parties
      • Sending Party Invites
      • Joining Parties
      • Managing Party Players
      • Party Player Actors
      • Leaving Parties
    • Reservations
      • Overview
      • Using Reservations
      • The Host Reservation
      • Completing Reservations
    • Lobby
      • Overview
      • Lobby Setup
      • Set Players Ready
      • Lobby Player Data
      • Starting The Match
      • Updating Lobby Session
      • Leaving The Lobby
    • Widgets
  • Guides
    • Creating a Level Selector
    • Integrating with Lyra Game
    • Integrating with EIK
  • Advanced
    • Steam Sockets
    • Reconnect Parties
    • Custom Party Variables
    • Player Groups
  • Changelog
    • API Upgrades
    • Legacy
Powered by GitBook
On this page
  1. Usage
  2. Lobby

Set Players Ready

PreviousLobby SetupNextLobby Player Data

Last updated 10 months ago

By default, players need to ready up in order for the match to start.

When enough players are present in the lobby a countdown timer will be started. When all players are ready, the lobby will fast forward the countdown time and transition into the StartingMatch state.

Toggle Player Ready State

Whether a player is ready or not is handled by the KronosLobbyPlayerState class. You can toggle the ready state of the player, or set it directly. Both functions are exposed to blueprints. In most cases, all you have to do is call TogglePlayerReady on the local player state. The ready state of the player will replicate down to all other players.

If you are using the KronosLobbyWidget then you can use the GetLocalPlayerState function to access the local player state casted into the correct type. This widget also contains the OnPlayerIsReadyStateChanged event which is called when the local player's ready state is changed.

#include "Lobby/KronosLobbyPlayerState.h"
// Get the local player state.
AKronosLobbyPlayerState* PlayerState = GetLocalPlayerState();
if (PlayerState)
{
    // Toggle the ready state of the player.
    PlayerState->TogglePlayerIsReady();
}