# Continuous Triggers

You may need the type of triggers that require continuous interaction in order to be active.&#x20;

On practice, such triggers can be used, for exampe, together with *Simultaneous logics,* when not the player who activates the trigger, but a separate physical object. Thus, these objects must be always intact with the trigger. Otherwise, the trigger is deactivated.

There is another very different use case for these triggers. All of them contain the property called *"activationDelay"*. This property is used if you want to make the player to do a continuous action for over a certain time period. For example, stay in the trigger for 3 seconds.

{% hint style="warning" %}
If *activationDelay* **is set to 0**, then the trigger immediately deactivates as soon as the object stops interaction with it.

If *activationDelay* **is not 0**, then the trigger stays active even if the object stops interaction with it.
{% endhint %}

{% hint style="info" %}
These triggers use optimised implementation of the continuous events. This means that it doesn't implement, for example, built-in *OnTriggerStay* method, because it is called every frame, thus is highly inefficient. Instead, it make use of the opposing events that occur only once (e.g., *OnTriggerEnter + OnTriggerExit*).
{% endhint %}

## OnTriggerStayPuzzleTrigger

The trigger will be activated when the object with the compatible tags is staying inside the trigger.

## OnKeyHoldPuzzleTrigger

The trigger will be activated when the object with the compatible tags is staying inside the trigger **AND** holding a specified key on keyboard.

## OnMouseHoldPuzzleTrigger

### MouseEvent

#### Click

The trigger will be activated when the mouse is being pressed at the trigger.

#### Positional

The trigger will be activated when the mouse is being held over the trigger.


---

# 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://puzzlesystem.gitbook.io/project/manual/triggers/continuous-triggers.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.
