# Padlock (Advanced Puzzle)

<figure><img src="/files/LYIiixapUXXVKP49gT2z" alt="" width="375"><figcaption></figcaption></figure>

Drag the component from the subcomponents bar to the scene you're working on.

{% hint style="info" %}

All the minigames and puzzles must be set up with actions to work properly and also define what happens once the player wins, finishes or lose.
{% endhint %}

### How to change the component style <a href="#how-to-change-the-component-style" id="how-to-change-the-component-style"></a>

To resize it, use the arrow icon in the top menu.

<figure><img src="/files/64JZu0AuvZz0d6h42of6" alt=""><figcaption></figcaption></figure>

There are **four different padlock designs** available (see the image below). All of them work and are set up in the exact same way. You can freely choose the one that best fits your game’s design.

<figure><img src="/files/62pfrmeTVTaL1v9gRxhp" alt=""><figcaption></figcaption></figure>

### How to set up the Padlock puzzle

Click on the puzzle and then on the settings gear icon that will appear in the top menu or double click on the puzzle.

#### Puzzle

Here you can define:

* **Password length** → Set the number of characters (minimum 3, maximum 5).
* **Symbols** → Choose between **letters** or **numbers** (you cannot mix both).
* **Solutions** → Add one or multiple valid solutions for the puzzle.
* **Preview** → Check how the padlock will look and test the combinations.

#### Advanced

In the Advanced settings you can:

* Mute the game.
* Change the puzzle volume.
* Set the wait time (in seconds) between when the player solves the padlock and when the win or lose actions are executed.

<figure><img src="/files/949iShd0XJhYtCwdzlxb" alt=""><figcaption></figcaption></figure>

### Player interaction

Players can rotate the padlock wheels to set the right combination and unlock it.

<figure><img src="/files/gSswQzeRbB82JkAI8tRw" alt=""><figcaption></figcaption></figure>

### How to set up the actions when the player interacts with the puzzle

There are different actions you can configure for this game.

#### When the player solves the padlock

You can set up one or more of the following actions:

* **Go to another scene in the game**
* **Add X points**
* **Subtract X points**
* **Visit an external URL**

#### When the player fails a part of the combination

You can also define actions when the player selects an incorrect combination. Possible actions include:

* **Visit an external URL**
* **Subtract X points**
* **Add X points**
* **Go to another scene in the game**

{% hint style="info" %}
It's very important to specify what should happen in each case. Click on the Actions icon in the top menu and add one or more actions for both when the player gets the puzzle right or wrong.
{% endhint %}


---

# 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://academy.theufolab.com/game-editor/components/minigames/padlock-advanced-puzzle.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.
