> For the complete documentation index, see [llms.txt](https://docs.decentraland.org/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.decentraland.org/creator/scene-editor/interactivity/trigger-area.md).

# Trigger Area

To trigger an action when the player walks into or out of an area, use the Trigger Area [Smart Item](/creator/scene-editor/interactivity/smart-items.md).

![](/files/KbTrQVodpFxfnlvpVfDb)

The orange cube you see while editing your scene is only visible in the Scene Editor, it becomes invisible when running a preview of the scene. You can easily adjust and scale the orange cube to cover exactly the area you need.

If any part of an avatar's body — the local player or any other player rendered in the scene — overlaps with this orange cube, the assigned event will be called.

Use the **On Player Enters Area** and **On Player Leaves Area** trigger types on the item's **Triggers** component. The actions on these trigger events are activated every time that the player enters or leaves the area.

![](/files/txJdv8FyLjerpdkftrtD)

You can add as many different actions on the same trigger event, this will activate them all simultaneously.

{% hint style="info" %}
**💡 Tip**: If the trigger areas in your scene start getting in the way of editing other content, remember you can always lock and/or hide them from the [Entity Tree](/creator/scene-editor/get-started/scene-editor-essentials.md#the-entity-tree).

<img src="/files/nY578fcsXCorNvO9pWwu" alt="" data-size="original">
{% endhint %}

You can also add **Trigger conditions**, so that the actions are only carried out if certain conditions are met in the scene. For example, you could have a trigger area that opens a sliding door when the player walks in; you could use a condition there to check the state of a lever that acts as a power switch, and only open the door if the power is on. See [States and conditions](/creator/scene-editor/interactivity/states-and-conditions.md) for more details.

![](/files/qnkSPAFzM7n1Q6n3AIqt)

Multiple trigger areas can overlap, and don't affect each other.

{% hint style="info" %}
**📔 Note**: You can also use **On Player Enters Area** and **On Player Leaves Area** trigger events on any other smart item, but keep in mind that it can be challenging to know the area covered by the trigger.

The size of the triggerable area doesn't relate to the item's visible shape or its colliders, it's always a cube of 1m on each side, affected by the scale of the item.
{% endhint %}

{% hint style="info" %}
**💡 Tip**: Trigger areas in the Scene Editor fire for any avatar — the local player and any other players rendered nearby. If you need to react only to the local player and ignore other avatars, drop down to code and use the [SDK7 TriggerArea component](/creator/scenes-sdk7/3d-content-essentials/trigger-areas.md) with the `CL_MAIN_PLAYER` collision layer.
{% endhint %}


---

# 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, and the optional `goal` query parameter:

```
GET https://docs.decentraland.org/creator/scene-editor/interactivity/trigger-area.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
