# Leaderboard

A detailed explanation of controls and interface functions are described in the section [State Machine Builder User Interface](https://docs.google.com/document/d/1-o5qSv4zTkzj7YSmRTkV4zezFq7lwU00FyTy0kw1l1U/edit#bookmark=id.6vu41emx3478).

1. Within the edit Simulation section of the HyperSkill Desktop application, navigate to the State Machine tab.
2. Click on the desired state and from the dropdown in either the entry or exit actions select the type Leaderboard.
3. Press the + button to add the state to the action list.
4. Next to the Currently Recorded dropdown press the Expand button.
5. This will bring up a new menu showing the attributes that can be recorded/used as a method of display within the Leaderboard function.\
   a. By default, only Time Spent In Simulation is available to be added but any Player Attributes can be added as well.
6. Next to the attribute you wish to add to the Leaderboard select the + button. This will move it from the column on the left to the one on the right indicating that it will be included in the leaderboard.
7. Choose the sort order of records to be either Ascending (lowest value on top) or Descending (highest value on top).
8. You are able to adjust where or at what priority values are ranked at with the Up and Down arrows within the right side of the panel.
9. To remove a variable from the Leaderboard scoring press the delete button on the right side of the recorded variable.
10. When you are done with your leaderboard setup hit the Save button.


---

# 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.siminsights.com/authoring-a-simulation/state-machine/actions/leaderboard.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.
