> 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="https://1095504291-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FiNhXrPwcj8TJ32pNkD2R%2Fuploads%2F8EgYRO1bjlIC35w61o66%2Fimage.png?alt=media&amp;token=dadae5ef-f25b-4b45-958e-f420be93b112" 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="https://1095504291-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FiNhXrPwcj8TJ32pNkD2R%2Fuploads%2FZruZYs7PiFvVhyF3aCH0%2Fimage.png?alt=media&amp;token=2a65b324-10a2-48d1-abf3-3c489b8916dd" alt="" width="563"><figcaption><p>Base Settings</p></figcaption></figure>

<figure><img src="https://1095504291-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FiNhXrPwcj8TJ32pNkD2R%2Fuploads%2FryKP7CoOPYHNKYlCriPr%2Fimage.png?alt=media&amp;token=fefe66fe-0427-449b-a4d6-ccef6d584773" 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="https://1095504291-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FiNhXrPwcj8TJ32pNkD2R%2Fuploads%2FBTiYRIz5UIHFN1tgq3qZ%2Fimage.png?alt=media&amp;token=a31d3669-e176-4150-94c7-11608853b3f9" 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="https://1095504291-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FiNhXrPwcj8TJ32pNkD2R%2Fuploads%2Fi7xUZQI8mDVAzkvnnKPM%2Fimage.png?alt=media&amp;token=7eca9fc9-8f6b-4e2d-8546-19c99b94d5fa" 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 %}
