# Gameplay

## How to get the user number of runs?

* [ ] Use the [**Request Number of Runs** action](#retrieving-number-of-runs) to get the number of runs (1)
* [ ] Update your global variable with the number of runs from the [**Get Number of Runs** expression](#retrieving-number-of-runs) (2)

<figure><img src="https://2351247042-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9QQIPimQeOGE3C1HbWxf%2Fuploads%2FHtgIiZbKOc54847W5QTZ%2Fimage.png?alt=media&#x26;token=77fa0df7-df0f-468e-b1d7-5130ef02b778" alt=""><figcaption></figcaption></figure>

## Retrieving the number of runs

The **Request Number of Runs** action retrieves the total number of runs a user has made on the leaderboard, optionally filtered by a specific map ID. It sends a request to the leaderboard API, appending the user ID and if provided, the map ID as query parameters. The response returns a count of the runs, which can be obtained using the **Get Number of Runs => number.** Once the number of runs is successfully retrieved, the **On Number of Runs Received** condition is triggered.
