# Rectangle Trigger

A trigger based on a rectangular area in the world. You can set it to trigger when the player enters, is inside, or exits the area.

### Attributes

<table data-header-hidden data-full-width="false"><thead><tr><th width="109.99993896484375">Attribute</th><th>Description</th></tr></thead><tbody><tr><td><strong>Active On Start</strong></td><td><strong>Enabled:</strong> the trigger will start evaluating the trigger conditions as soon as the missions starts<br><strong>Disabled:</strong> you need to activate this trigger during the mission</td></tr><tr><td><strong>Fire Once</strong></td><td><strong>Enabled:</strong> the trigger will deactivate (stop evaluating) when it fires a connection for the first time<br><strong>Disabled:</strong> the trigger will keep firing the connected events until it is deactivated</td></tr><tr><td><strong>Length</strong></td><td>Length of the area in meters</td></tr><tr><td><strong>Width</strong></td><td>Width of the area in meters</td></tr><tr><td><strong>Orientation</strong></td><td>Heading of the area in true degrees north (not equal to magnetic north)</td></tr></tbody></table>

### Actions

<table data-header-hidden><thead><tr><th width="110">Action</th><th>Description</th></tr></thead><tbody><tr><td><strong>Activate</strong></td><td>The trigger start evaluating the trigger conditions</td></tr><tr><td><strong>Deactivate</strong></td><td>The trigger will stop evaluating the trigger conditions</td></tr></tbody></table>

### Events

The events are only fired when the trigger is active

<table data-header-hidden><thead><tr><th width="109.99993896484375">Event</th><th>Description</th></tr></thead><tbody><tr><td><strong>On Enter</strong></td><td>Fires when the player goes from outside to inside the area</td></tr><tr><td><strong>While Inside</strong></td><td>Fires when the player is inside the area (also if the player is already inside when the trigger is activated)</td></tr><tr><td><strong>On Exit</strong></td><td>Fires when the player goes from inside to outside the area</td></tr></tbody></table>

## See also

[Circle Trigger](/miltech-mission-hub/detailed-documentation/map-objects/circle-trigger.md)


---

# 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://docs.miltechsimulations.com/miltech-mission-hub/detailed-documentation/map-objects/rectangle-trigger.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.
