> For the complete documentation index, see [llms.txt](https://docs.sandbox.game/en/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.sandbox.game/en/creator/game-maker/docs/behaviours/npc-ai-pawns/friendly-npc.md).

# Friendly NPC

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

## <img src="https://331512196-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F83PS3g9zpWmq73xzlwFn%2Fuploads%2FfNz3kDBnzCyaVmFKoZPb%2Fimage.png?alt=media&amp;token=8e494da1-ce28-4f62-8aa7-81bcc7bd6815" alt="" data-size="line"> Friendly NPC <mark style="color:yellow;">**\[MP]**</mark>

* Assign non-hostile NPC actions like healing, farming, and walking around.

{% hint style="info" %}
In the first iteration of this behaviour (GM 0.11), only walk and flee modules are included. More modules are in development.
{% endhint %}

### Common Uses

* Trigger part of an NPC's behavior when needed, with specific settings
* Vary movement zone and speed when a module is triggered to take action
* Set up how an NPC should interact with players and objects per module

## How it Works

### Trigger: On start or multiple messages

### Action: Varies per module added

## Parameter Notes

Modules can be added depending on the way you want the NPC to interact with objects and players in the game world. Add a module, then click on it to edit its logic.

<div><figure><img src="https://331512196-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F83PS3g9zpWmq73xzlwFn%2Fuploads%2FYcDeLoDsihk65dnaZnvF%2Fimage.png?alt=media&amp;token=4adea8c7-989a-40f9-8af1-a8ce16cef4e2" alt="" width="324"><figcaption><p> Main View</p></figcaption></figure> <figure><img src="https://331512196-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F83PS3g9zpWmq73xzlwFn%2Fuploads%2FcBgU33EDojUva7TpXu4e%2Fimage.png?alt=media&amp;token=304bf875-f2da-42da-8e31-f0a5033a3e37" alt=""><figcaption><p>Walk module</p></figcaption></figure> <figure><img src="https://331512196-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F83PS3g9zpWmq73xzlwFn%2Fuploads%2F11PjHYpwI6pkaakH7Bv8%2Fimage.png?alt=media&amp;token=17273319-38fd-48e2-ba64-6e6258b3d09c" alt=""><figcaption><p>Flee module</p></figcaption></figure></div>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.sandbox.game/en/creator/game-maker/docs/behaviours/npc-ai-pawns/friendly-npc.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
