> For the complete documentation index, see [llms.txt](https://horizongames.gitbook.io/kronos-matchmaking/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://horizongames.gitbook.io/kronos-matchmaking/usage/lobby/set-players-ready.md).

# Set Players Ready

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

{% hint style="info" %}
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.
{% endhint %}

## 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.

{% tabs %}
{% tab title="Blueprint" %}

<figure><img src="/files/nPW0GvXDAr6bFGhPF0W8" alt=""><figcaption></figcaption></figure>
{% endtab %}

{% tab title="C++" %}

```cpp
#include "Lobby/KronosLobbyPlayerState.h"
```

```cpp
// Get the local player state.
AKronosLobbyPlayerState* PlayerState = GetLocalPlayerState();
if (PlayerState)
{
    // Toggle the ready state of the player.
    PlayerState->TogglePlayerIsReady();
}
```

{% endtab %}
{% endtabs %}
