# Trap Triggers

![](/files/-MW4utPVxt0oZTeRFX7r)

Use this component to create player interaction with the trap. You can create trigger zones that activate the trap when the player enters, such as a pressure plate. You can use this component in a more advanced way, like using a disarm box when the player presses the E key.

This component depends on a Collider, with the *isTrigger* parameter enabled.

![](/files/-MVvgTfuHgA3WoZeOyd2)

* **Trap:** drag and drop the trap that this trigger manipulates.
* **Action:** you can activate, deactivate the target trap, or toggle between these two states.
* **Cooldown:** how many seconds before the trigger would work again.
* **Tag:** only trigger when a game object with one of these tags enter. In most cases, this will be the Player.
* **Interaction:** You can allow the player to execute an action by pressing a button while staying in the trigger area instead of just walking into it. You can use [Key Codes](https://docs.unity3d.com/ScriptReference/KeyCode.html) or [Unity Input](https://docs.unity3d.com/Manual/class-InputManager.html).
* **Events:** You can use these events to make visual effects for the trigger or show/hide a UI element.

{% hint style="info" %}
You can use this component without a trap, but currently, only the **Activate** and the **Deactivate** actions are supported.
{% 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://traps.runemarkstudio.com/traps/triggering-a-trap.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.
