# How to make enemy projectiles shoot in the direction of the player?

**URL:** <https://forum.makecode.com/t/how-to-make-enemy-projectiles-shoot-in-the-direction-of-the-player/30087>\
**Category:** Help\
**Created:** [August 12, 2024, 1:49am UTC](https://forum.makecode.com/t/how-to-make-enemy-projectiles-shoot-in-the-direction-of-the-player/30087 "2024-08-12T01:49:30Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![HelpMeh](https://avatars.discourse-cdn.com/v4/letter/h/e0b2c6/32.png) [@HelpMeh](https://forum.makecode.com/u/HelpMeh)\
**Post date:** [August 12, 2024, 1:49am UTC](https://forum.makecode.com/t/how-to-make-enemy-projectiles-shoot-in-the-direction-of-the-player/30087/1 "2024-08-12T01:49:30Z")

</div>

I’m trying to make a top-down dungeon crawler with a boss that shoots projectiles at the player, how do I make the projectiles shoot in the direction of the player? I want it to shoot where the player initially was when the projectile is created instead of following the player.

Also a bit of extra if you could be bothered, I also want them to launch 3 at the same time but in slightly different directions, working a little like a shotgun.

Here’s what I mean:

 ![image](https://us1.discourse-cdn.com/flex020/uploads/makecode/original/3X/b/9/b9124bf39683b761a59205671f3bf51f39131c1f.png)

---

<div class="post-metadata">

**Author:** ![Luke](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/luke/32/32519_2.png) [@Luke](https://forum.makecode.com/u/Luke)\
**Post date:** [August 12, 2024, 1:22pm UTC](https://forum.makecode.com/t/how-to-make-enemy-projectiles-shoot-in-the-direction-of-the-player/30087/2 "2024-08-12T13:22:38Z")

</div>

Use the darts extension to help you, it’s in the default extentsion list when you click +

---

<div class="post-metadata">

**Author:** ![redSprite](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/redsprite/32/34262_2.png) [@redSprite](https://forum.makecode.com/u/redSprite)\
**Post date:** [August 12, 2024, 4:52pm UTC](https://forum.makecode.com/t/how-to-make-enemy-projectiles-shoot-in-the-direction-of-the-player/30087/3 "2024-08-12T16:52:52Z")

</div>

Here is a Demo of what I think you need:

> **[Shotgun-Demo](https://arcade.makecode.com/S15642-33205-19670-99703)**
>
> Made with ❤️ in Microsoft MakeCode Arcade.

The Demo uses the Sprite Utils extension:

```auto
jwunderl/arcade-sprite-util

```

---

<div class="post-metadata">

**Author:** ![HelpMeh](https://avatars.discourse-cdn.com/v4/letter/h/e0b2c6/32.png) [@HelpMeh](https://forum.makecode.com/u/HelpMeh)\
**Post date:** [August 13, 2024, 12:36pm UTC](https://forum.makecode.com/t/how-to-make-enemy-projectiles-shoot-in-the-direction-of-the-player/30087/4 "2024-08-13T12:36:59Z")

</div>

This was perfect! It’s also amazing how easy it is to customize! I was able to give the boss phases where it shoots more projectiles at once depending on how much health it has, thanks a bunch!
