> For the complete documentation index, see [llms.txt](https://october-studio.gitbook.io/monster-survivors-documentation/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://october-studio.gitbook.io/monster-survivors-documentation/enemies/ranged-enemies.md).

# Ranged Enemies

Ranged Enemies is a feature introduced in version 1.1.0. It allows you to quickly and easily add enemies that shoot projectiles in different manners.

{% hint style="info" %}
Adding an enemy of this type is identical to the Simple Enemies. Visit [Add a Simple Enemy](/monster-survivors-documentation/enemies/add-a-simple-enemy.md) to learn more.
{% endhint %}

Ranged Enemies share all the base settings with Simple Enemies. However, there are some notable differences. To see how this setup works in practice, let's take a look at the example prefab.&#x20;

1. Navigate to <img src="/files/4EHqY9uxwMF1JWnA0M8k" alt="" data-size="line"> and open it.&#x20;

Prefab structure is the same as for Simple Enemies, apart from the Behavior Script. As usually, it is attached to the parent object of this prefab.

2. Take a look at the Ranged Enemy Behavior script. It should look like this:

<figure><img src="/files/MInkCP7kL0imkpsqbV9I" alt="" width="563"><figcaption><p>Base Settings</p></figcaption></figure>

<figure><img src="/files/0mBFeArRU8ZeN0RzSAwd" alt="" width="563"><figcaption><p>Ranged Enemy Specific Settings</p></figcaption></figure>

Adjust the settings according to your desires.

{% hint style="info" %}
If you want to turn a simple enemy into ranged one, you can do it easily by swapping Behavior script to a ranged one. Make sure to assign everything properly.
{% endhint %}

3. Projectile Prefab field has to link to a proper projectile for this to work.&#x20;
4. Let's take a look at the example Projectile prefab.

Navigate to <img src="/files/IF5Zg0U0Gwtetk83ISBp" alt="" data-size="line"> and open it.

Projectile prefab has a parent object, and a particle as a child. You can use any particle that fits your vision here.

In the parent object you will see 2 important components: 2D Collider and a Simple Enemy Projectile Behavior Script.&#x20;

<figure><img src="/files/MoWxTrYx9nZkjLnMQjhQ" alt="" width="375"><figcaption></figcaption></figure>

Make sure that your projectile has these components attached

<mark style="color:yellow;">Also make sure that Layer is correctly set to Enemy Projectile.</mark>

{% hint style="info" %}
The Trail field in Simple Enemy Projectile Behavior script is optional - if your particle doesn't use trails you can leave it empty.
{% endhint %}


---

# 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 dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://october-studio.gitbook.io/monster-survivors-documentation/enemies/ranged-enemies.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
