# Speaker

{% 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 %}

<figure><img src="https://331512196-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F83PS3g9zpWmq73xzlwFn%2Fuploads%2FNxLEC58vIm6FbBANyX3D%2Fimage.png?alt=media&#x26;token=1af6bcfb-ed14-4572-bfa5-97be8d200e59" alt=""><figcaption></figcaption></figure>

{% hint style="warning" %}
**GAME MAKER 0.11 - COLLISIONS UPDATE**

Collisions will be automatically removed from objects when **\[SP] Speaker** is applied due to inconsistent physics in multiplayer from the **Look at Target** option rotating assets in multiplayer Experiences. There are two approaches to working around this change:

* Change the **\[SP] Speaker** component to **\[MP]**, keeping in mind that it will behave differently in multiplayer Experiences.
* Keep the **\[SP] Speaker** component on the object. Then, create a duplicate, remove all of its logic, and set it to invisible.
  {% endhint %}

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

## ![](https://331512196-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F83PS3g9zpWmq73xzlwFn%2Fuploads%2FWRGkJ8Fzm0LsFE07kTxT%2Fimage.png?alt=media\&token=cce224ac-ea7a-436a-b69d-4fe680dbef9b) Speaker <mark style="color:green;">\[SP]</mark> <mark style="color:yellow;">\[MP]</mark>

Apply the Speaker component to display messages and/or send messages.Use Speaker to start quests, give hints to the player or trigger something to happen elsewhere.

## Common Uses

* Display text above the asset for labels, "barks" to get player attention, etc.
* Have dialogue between NPCs to tell a story
* Detect the Avatar to send a message or display text
* Used as a logic tool to trigger messages at certain intervals
* Cause the asset to turn and face the detected player or asset (by tag)

{% hint style="success" %}
See [text-quests-and-icons](https://docs.sandbox.game/en/creator/game-maker/creative-guides/logic-guide/text-quests-and-icons "mention") for logic tips and text formatting related to this feature.
{% endhint %}

## Communications

<table data-header-hidden><thead><tr><th width="370"></th><th></th></tr></thead><tbody><tr><td><strong>Inputs:</strong> Detect entity or Wait for message.</td><td><strong>Outputs:</strong> Send message in a range or to All.</td></tr></tbody></table>

## Parameters

| Options                                                                                         | Details                                                                                                                                                                                                                                                                                                                                                                                                                                                          |
| ----------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| ![](https://content.gitbook.com/content/83PS3g9zpWmq73xzlwFn/blobs/jyiSGnAT0izdGu6QuBUH/1.png)  | **Text To Display** - The text to display in the box.                                                                                                                                                                                                                                                                                                                                                                                                            |
| ![](https://content.gitbook.com/content/83PS3g9zpWmq73xzlwFn/blobs/46Mnc7piC5PrVnTlfcg8/2.png)  | **Display Duration** - How long before the text box is hidden.                                                                                                                                                                                                                                                                                                                                                                                                   |
| ![](https://content.gitbook.com/content/83PS3g9zpWmq73xzlwFn/blobs/CMkf92yp2pyg7herf6jV/3.png)  | **Always On Top** - Set whether the box always appears over other objects, blocks, etc. or can be hidden behind them.                                                                                                                                                                                                                                                                                                                                            |
| ![](https://content.gitbook.com/content/83PS3g9zpWmq73xzlwFn/blobs/In3ULwrWtflGHkAjbug0/4.png)  | **Look At Target** - Set whether the asset should stay still or rotate to face a detected player or asset (by tag).                                                                                                                                                                                                                                                                                                                                              |
| ![](https://content.gitbook.com/content/83PS3g9zpWmq73xzlwFn/blobs/GhOGUQ29vq8oiI2X28oM/5.png)  | **Rotation Duration** - The time is takes to face the detected asset or player.                                                                                                                                                                                                                                                                                                                                                                                  |
| ![](https://content.gitbook.com/content/83PS3g9zpWmq73xzlwFn/blobs/20Rcz2x5hotQl8qGgcra/6.png)  | **Speak Condition** - Defines how the text is triggered.                                                                                                                                                                                                                                                                                                                                                                                                         |
| ![](https://content.gitbook.com/content/83PS3g9zpWmq73xzlwFn/blobs/MFlV7ZwWrB0SkzhLUsvd/7.png)  | **Detection Type - what to detect** (may include objects, players, tags, or specific assets)                                                                                                                                                                                                                                                                                                                                                                     |
| ![](https://content.gitbook.com/content/83PS3g9zpWmq73xzlwFn/blobs/aFugeD6x0RPQm5MyHlBi/8.png)  | **Detection Shape** - Defines the shape for the detection zone.                                                                                                                                                                                                                                                                                                                                                                                                  |
| ![](https://content.gitbook.com/content/83PS3g9zpWmq73xzlwFn/blobs/kOCI1ZzGXJMyQcBMc6tj/9.png)  | **Detection Range** - the range at which to detect actors.                                                                                                                                                                                                                                                                                                                                                                                                       |
| ![](https://content.gitbook.com/content/83PS3g9zpWmq73xzlwFn/blobs/u0eWsMEolDZwEdAtYlrA/10.png) | **Message To Send** - message sent when triggered.                                                                                                                                                                                                                                                                                                                                                                                                               |
| ![](https://content.gitbook.com/content/83PS3g9zpWmq73xzlwFn/blobs/93I9WHj71byhMY9lSrui/11.png) | <p><strong>Broadcast Type</strong><br><br><strong>All</strong> - Send the message to all objects.<br><br><strong>Everyone in Range</strong> - Send the message to all objects and players in range.<br><br><strong>Specific Tags In Range</strong> - Send the message to all objects or players in range with the specified tag(s).<br><br><strong>Selected Actors</strong> - Send the message to a specified object that has been placed in the Experience.</p> |
| ![](https://content.gitbook.com/content/83PS3g9zpWmq73xzlwFn/blobs/K0CmGmkMMUQdkeTWn8GZ/12.png) | <p><strong>Broadcast Duration Type</strong><br><br><strong>Once</strong> - One time<br><br><strong>Duration</strong> - Set the amount of time in seconds and delay between broadcasts<br><br><strong>Forever</strong> - Broadcast forever with a delay between broadcasts</p>                                                                                                                                                                                    |
| ![](https://content.gitbook.com/content/83PS3g9zpWmq73xzlwFn/blobs/2V9pEx2idBfhGhraDBmH/13.png) | **Only Once** - Send the message more than one time or only one time ever.                                                                                                                                                                                                                                                                                                                                                                                       |


---

# 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/components/actions/speaker.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.
