# Citizen

{% 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="/files/NWG1VLAYuoyaNV4pmqLo" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
This Behaviour has not yet been migrated for use in multiplayer Experiences.
{% endhint %}

## <img src="/files/l07xidcolweQFRTEuzHO" alt="" data-size="original"> Citizen

* Walks randomly within a defined zone
* Does not attack or defend
* Detects hostile enemies and flees

## Common Uses

* NPCs, or non-player characters, who avoid conflict
* Randomly moving obstacles with set movement zones (when placed on the surface of Blocks)

## Communications

<table data-header-hidden><thead><tr><th width="278"></th><th></th></tr></thead><tbody><tr><td><p><strong>Inputs:</strong></p><p>Detects Hostiles or other Tags</p></td><td><p><strong>Outputs:</strong></p><p>Moves away</p></td></tr></tbody></table>

<img src="/files/cOmCA0rDUnb0QPDidDsB" alt="" class="gitbook-drawing">

## Parameters

| Options                          | Details                                                                                                                                                                                                                                                                                                                                                                                                             |
| -------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| ![](/files/xzK6S6HANB8mh3tK6Rlp) | <p><strong>Walking Zone</strong> - define the space where the Object will walk around passively. It may step up or down one block at a time.<br><br>This parameter is visualised with a blue cube Gizmo that adjusts as you enter new <mark style="color:red;"><strong>X</strong></mark>, <mark style="color:green;"><strong>Y</strong></mark>, and <mark style="color:blue;"><strong>Z</strong></mark> values.</p> |
| ![](/files/AvNDitSn7tXJNgsi7KoL) | <p><strong>Walk Speed</strong> (slider) - set the walking speed of the Object using a slider or by entering a value.<br><br>The value defines the amount of blocks travelled per second by the Object.</p>                                                                                                                                                                                                          |
| ![](/files/tXodZ2NWGwr6P26VsXr3) | **Can Flee** - if set to **true**, the Object can flee from enemy tags if it is attacked or if it detects an enemy within its enemy detection range.                                                                                                                                                                                                                                                                |
| ![](/files/b8GkVedSYNkS0XexLWgv) | *<mark style="color:green;">**Flee when Attacked**</mark>* - if set to **true** the Object will flee if it is attacked.                                                                                                                                                                                                                                                                                             |
| ![](/files/P5EaiKCI1TcvZfLIFcLc) | *<mark style="color:green;">**Flee Speed**</mark>* (slider) - Determines the speed at which the Object will flee. The value defines the amount of blocks the Object will travel per second when fleeing.                                                                                                                                                                                                            |
| ![](/files/s5ux36OgTLKs5zAnzqsq) | <p><em><mark style="color:green;"><strong>Tags to Flee</strong></mark></em> - Determines which tags the Object detects as an enemy and will flee from.<br><br>Press <img src="/files/9r1klje7KtQEtYjVfydZ" alt="" data-size="line"> to remove default or other unwanted tags.</p>                                                                                                                                   |
| ![](/files/lIKFZuWQnV2Fu3Ninnio) | <p><em><mark style="color:green;"><strong>Enemy Detection</strong></mark></em> (slider) - defines the range within which the Object will detect "tags to flee".<br><br>This parameter is visualised with a red circle Gizmo that adjusts as you move the slider or change the value.</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/npc-ai-pawns/citizen.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.
