Puzzle System
Search…
SimultDelayedPuzzleLogic
The type of puzzles that require the player to keep all triggers activated at the same time (deactivation happens over time).

Use Case

There are 3 buttons located in different parts of the scene. The player must keep them activated at the same time in order to activate the secret message. The buttons, however, after being pressed, are resetted back to initial state in 5 seconds. Thus, the player must act quickly, running from one button to another, in order to solve the problem.

Customisation

There are a few useful properties that will help you to make the system fit your needs.
    float delay -- how long will the triggers stay active before they are untriggered back?
    bool delayedSolvedReset -- should the triggers be resetted when the puzzle solved only after the delay is expired? Sometimes, even if the puzzle is finally solved, you don't want to reset the triggers immediately, but give them a chance for a natural reset after the given delay is expired.
    bool delayedFailedReset -- the same concept as for the previous property, but now only in case of the failure event.

Critical Events

OnSolved

Happens when all triggers are being active at the same time.

OnFailed

Happens when the delay has passed for any of the activated triggers.
Last modified 2yr ago