# 1- Animated Decoration

<div><figure><img src="https://720472001-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FxtSE2VesmXDh9sxeeNMF%2Fuploads%2FcmkGEPVVFnNz4qYOCwNV%2F1-%20Animated%20Decoration%20SP.png?alt=media&#x26;token=39a30401-b249-4491-9f67-9a02c1f0d211" alt=""><figcaption><p>Global </p></figcaption></figure> <figure><img src="https://720472001-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FxtSE2VesmXDh9sxeeNMF%2Fuploads%2F3zmWUSFBUxZJouovPVSD%2F1-%20Animated%20Decoration%20MP.png?alt=media&#x26;token=ac1295f5-58a5-48ea-8e98-46120e75f996" alt=""><figcaption><p>Local</p></figcaption></figure></div>

**OFFICIAL DOCUMENTATION THE SANDBOX CREATORS:**\
**\[**[**https://docs.sandbox.game/en/v/creators/game-maker/docs/behaviours/animated-decoration**](https://docs.sandbox.game/en/v/creators/game-maker/docs/behaviours/animated-decoration)**]**\
\
**Description:** \
The Animated Decoration Behavior is a feature in GameMaker that allows you to add animations to your in-game assets. This behavior consists of 11 Logic Parameters that enable control over various aspects of the animation, such as which animation will be displayed, the speed of the animation, whether it should loop indefinitely, how many times it should repeat, and under which conditions the animation should be shown. Moreover, it includes a detection sphere that senses the player's presence, as well as the ability to send messages at the beginning and end of the animation and the capability to interrupt the animation with another triggered animation. Overall, it seems to provide extensive control over the animation and how it interacts with the player and other Logic Elements.

{% embed url="<https://app.supademo.com/demo/A_n_ayeaSvV_38Wjzder->" %}

{% tabs %}
{% tab title="ANI-1" %}
ANI-1 - PlayCondition PlayOnStart: This condition activates the animation as soon as the game starts. It's a straightforward and automatic option, ideal for animations that should be seen as soon as the player enters a specific scene or level.

<figure><img src="https://720472001-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FxtSE2VesmXDh9sxeeNMF%2Fuploads%2FLhmPUZPX9Rmx4JLKWVzJ%2Fimage.png?alt=media&#x26;token=4c48363b-d5f1-45f5-9353-dbfd5969c491" alt=""><figcaption></figcaption></figure>
{% endtab %}

{% tab title="ANI-2" %}
ANI-2 - PlayCondition PlayOnReceiveMessage: \
This condition is more interactive and requires a specific action to be triggered. The animation will only start when the asset receives a specific message, allowing for more dynamic and contextual interaction. This can be used, for example, to activate animations when certain objectives are achieved or when specific events occur in the game.

<figure><img src="https://720472001-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FxtSE2VesmXDh9sxeeNMF%2Fuploads%2F3SENdufjUikOXPWA8ASR%2Fimage.png?alt=media&#x26;token=a9dcda69-c36e-43f8-b40a-776b6030681a" alt=""><figcaption></figcaption></figure>
{% endtab %}

{% tab title="ANI-3" %}
ANI-3 - PlayCondition PlayOnDetectPlayer:\
This is a player-centered option, where the animation is triggered based on the player's proximity or detection. It is useful for scenarios where the developer wants something to happen only when the player approaches or enters a specific area, such as motion detection on a security camera or triggering a trap.

<figure><img src="https://720472001-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FxtSE2VesmXDh9sxeeNMF%2Fuploads%2FSqzJ7Kk7JBXEcEnUU3yi%2Fimage.png?alt=media&#x26;token=dfd6cceb-896f-49fc-adf7-a9f39306aaae" alt=""><figcaption></figcaption></figure>
{% endtab %}
{% endtabs %}


---

# 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://sandbricks.gitbook.io/sandnet/gamemaker-logic/behaviors/1-animated-decoration.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.
