# Door

{% hint style="success" %}
**COPY/PASTE PARAMETERS**

New in GM 0.11! Right click on a behaviour or component to copy. Then open an object, add the same behaviour or component, and right click it to paste identical parameter settings.
{% endhint %}

{% hint style="info" %}
**GAME MAKER 0.9 ENHANCEMENT**

Instead of triggering a door to open or close with the same message(s), a door can now be triggered with different open and close messages.
{% endhint %}

<figure><img src="https://4251931498-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MO_j99BJEXK4zHqxgqS%2F-MOymmav5l4VAuhKdgpS%2F-MOynmzEa6E6UJLuUPXm%2FDoor.gif?alt=media&#x26;token=295c2e52-23bb-4394-8e08-6eb774fe735b" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
[Build Singleplayer & Multiplayer Logic](/en/creator/game-maker/docs/build-singleplayer-and-multiplayer-logic.md) - about <mark style="color:green;">**\[SP]**</mark> or <mark style="color:yellow;">**\[MP]**</mark> behaviours or components.
{% endhint %}

{% hint style="success" %}
**USE THE RIGHT TOOL FOR LOGIC STATES**

A new <mark style="color:green;">**\[SP]**</mark> and <mark style="color:yellow;">**\[MP]**</mark> [**Switch**](/en/creator/game-maker/docs/components/triggers/switch.md) component can be used to trigger two states and send a message for each state.

Previously, **Door** behaviour was used for this. It is now only available as <mark style="color:yellow;">**\[MP]**</mark> because a <mark style="color:green;">**\[SP]**</mark> version of **Door** behaviour would cause collision issues in multiplayer games.
{% endhint %}

## ![](/files/Enoj396lJ8Ddt5rkYW5g) Door <mark style="color:yellow;">\[MP]</mark>

* Rotate the Object 90 degrees or set any of the Object's built-in animations to play for "Open" and "Close" states
* "Open" mode temporarily removes the Object's collisions
* Interact or use any message to trigger a door to open and any message to trigger it to close (collecting a key, detecting a pickable key, etc)

## Communications

<table data-header-hidden><thead><tr><th width="328"></th><th></th></tr></thead><tbody><tr><td><p><strong>Inputs:</strong></p><p>Player Interaction<br>One or more Messages to open<br>One or more messages to close</p></td><td><p><strong>Outputs:</strong></p><p>Play animation, Message sent on Open<br>Play animation, Message sent on Close<br>OR<br>Rotate 90 degrees and back</p></td></tr></tbody></table>

## Common Uses

* Simple door with Interaction
* Intermediate to advanced door logic sequences for dungeons or puzzles
* Rotating an Object 90 degrees

## Parameters

| Options                                                             | Details                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
| ------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| <img src="/files/99GZ9yUJnRj5RrTrZOpr" alt="" data-size="original"> | <p><strong>Message Required to Open</strong> - one or more messages can trigger the door to open<br><br><strong>Message Required to Close</strong> - one or more messages can trigger the door to close</p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
| ![](/files/mPx7mTu9h0UjtZmKWpWF)                                    | <p><strong>Opening Mode</strong></p><ul><li><strong>Rotate</strong> - rotates the object with Door behaviour 90 degrees when opened and back when closed</li><li><strong>Animate</strong> - plays door animations when messages trigger a change in state</li></ul>                                                                                                                                                                                                                                                                                                                                                                                                                   |
| ![](/files/LkYYXnV4CEMuXD58DcOF)                                    | <p><em><mark style="color:green;"><strong>Opening Animation</strong></mark></em> - select the asset's animation you wish to display when you trigger the door to open with message<br><br><em><mark style="color:green;"><strong>Closing Animation</strong></mark></em> - select the asset's animation you wish to display when you trigger the door to close with message</p>                                                                                                                                                                                                                                                                                                        |
| ![](/files/8rIwm3foT5ryB65aIsrW)                                    | **Starting State** - set the state of the Object as Closed or Opened at the start of the Experience.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| ![](/files/3M4IcJytpNzbpgfFPsFZ)                                    | <p><strong>Message on Open</strong> - a message sent when the door opens<br><br><strong>Message on Close</strong> - a message sent when the door closes</p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
| ![](/files/MXDhH39tPH17S7oOOSaK)                                    | <p><strong>Broadcast Type</strong></p><ul><li><strong>All</strong> - all actors and systems</li><li><strong>Everyone in Range</strong> - all actors in range</li><li><strong>Specific Tags in Range -</strong> all actors in range with specific tags</li><li><strong>Selected Actors -</strong> specific actors in the Experience</li><li><strong>Rules -</strong> the Game Rules system</li><li><strong>Objectives -</strong> the Quest system</li><li><strong>Self -</strong> this object</li></ul><p><em><mark style="color:green;"><strong>Broadcast Range</strong></mark></em> (slider) - move the slider or enter a distance in blocks from the anchor point of the object</p> |


---

# 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.sandbox.game/en/creator/game-maker/docs/behaviours/movement/door.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.
