# InOrderPuzzleLogic

## Use Case

There are 3 buttons on the wall. The goal is to activate them, but only in a certain order. As soon as the order is fulfiled, the system will open the gates.

## Customisation

#### Randomisation

In the inspector you may specify whether or not you wish a randomized order in every new game session. If set to '*false*', the order will be specified by the order in the *triggers* array.

{% hint style="info" %}
Note that the randomization is happening only when the game is restarted.
{% endhint %}

There is a public method that you can use in order to retrieve the ordered triggers:

```
public CorePuzzleTrigger[] GetObjectsOfOrder();
```

It might be useful, for example, if you want to give cues in the outer world on the order. If randomisation is disabled, returns just the copy of the *triggers* array.

Although, as mentioned, automatic randomization happens only on start, you can randomize the order manually using another public method.

```
public void RandomizeOrder();
```

## Critical Events

### OnSolved

Happens when all triggers are activated in a correct order.

## OnFailed

Happens when the order was disrupted.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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://puzzlesystem.gitbook.io/project/manual/standard-logics/inorder.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.
