# General - Send Message

Sends Messages to the root GameObject of the target or the animal using the brain

<figure><img src="/files/IQMrSMfP6hKpYVJyR54D" alt=""><figcaption></figcaption></figure>

## Parameters (Except for Common Parameters)

### Affect

Apply the task to the Animal(Self) or the Target(Target)

### When

When to send the message

1. On Start
2. On Update
3. On Exit

### Use Send Message

Uses Unity.SendMessage method instead of the Internal way of sending messages on Malbers Components which is a bit faster. (Use this when you need to send messages to custom scripts)

### Send To Children

Sends the message to all the children gameobjects as well

### Near Target

Send the message ONLY when the AI is near the target e.g. AI has arrived at target.

### Send To Root

The message will be sent to the root of the hierarchy

### Messages (List)

Specify what messages to send in this list


---

# 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://malbersanimations.gitbook.io/animal-controller/main-components/ai/animal-brain/tasks/message.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.
