InOrderPuzzleLogic

The type of puzzles that require the player to activate all triggers in a certain order.

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.

Note that the randomization is happening only when the game is restarted.

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.

Last updated