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


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.metaproprotocol.com/developer-documentation/developer-documentation-for-the-construct-3-plugin/gameplay.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
