# Group of enemies tracking sprites

**URL:** <https://forum.makecode.com/t/group-of-enemies-tracking-sprites/42498>\
**Category:** Help\
**Tags:** game\
**Created:** [March 4, 2026, 10:02pm UTC](https://forum.makecode.com/t/group-of-enemies-tracking-sprites/42498 "2026-03-04T22:02:01Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![cdob10s](https://avatars.discourse-cdn.com/v4/letter/c/3ec8ea/32.png) [@cdob10s](https://forum.makecode.com/u/cdob10s)\
**Post date:** [March 4, 2026, 10:02pm UTC](https://forum.makecode.com/t/group-of-enemies-tracking-sprites/42498/1 "2026-03-04T22:02:01Z")

</div>

I just started using MakeCode arcade and ran into some issues making my own game. I have a couple towers on the ground and want my enemies to follow them and start attacking upon overlap. The problem is that only one enemy is moving, even when using the “array of enemies” block. Additionally upon destroying a tower, the enemy stops and does not move onto the next one. Any suggestion or feedback would be greatly appreciated.

---

<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:** [March 5, 2026, 4:20am UTC](https://forum.makecode.com/t/group-of-enemies-tracking-sprites/42498/2 "2026-03-05T04:20:02Z")

</div>

Could you please share your code?

It’s very broad, a link or a screenshot of the code is quite appreciated.

---

<div class="post-metadata">

**Author:** ![Air](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/air/32/26413_2.png) [@Air](https://forum.makecode.com/u/Air)\
**Post date:** [March 5, 2026, 4:21am UTC](https://forum.makecode.com/t/group-of-enemies-tracking-sprites/42498/3 "2026-03-05T04:21:24Z")

</div>

Hey, welcome to the community! If you’re having issues with your game, it’s usually best to send a link to your project so people can help you fix it without relying solely on a description. If you don’t know how to do that, here’s a quick tutorial!  
 ![Screenshot 2026-02-05 11.36.31](https://us1.discourse-cdn.com/flex020/uploads/makecode/original/3X/3/a/3a62a844f738521201297bb3960f9acac8c9cbdd.png)

 ![Screenshot 2026-02-05 11.37.44](https://us1.discourse-cdn.com/flex020/uploads/makecode/original/3X/8/8/884dc4207248f3b3ce23706f4b7285a2e8319698.png)  
 ![Screenshot 2026-02-05 11.40.05](https://us1.discourse-cdn.com/flex020/uploads/makecode/original/3X/c/8/c8671b9b998c7455cbef7220002c995b1199cffb.png)

---

<div class="post-metadata">

**Author:** ![OrigamiArtist](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/origamiartist/32/33299_2.png) [@OrigamiArtist](https://forum.makecode.com/u/OrigamiArtist)\
**Post date:** [March 5, 2026, 6:37pm UTC](https://forum.makecode.com/t/group-of-enemies-tracking-sprites/42498/4 "2026-03-05T18:37:33Z")

</div>

What is the code you are using to make the enemies do that? Just do what @Air said to post it and then we can help you!

---

<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:** [March 5, 2026, 6:39pm UTC](https://forum.makecode.com/t/group-of-enemies-tracking-sprites/42498/5 "2026-03-05T18:39:40Z")

</div>

> [@cdob10s](#):
>
> the enemy stops and does not move onto the next one. Any suggestion or feedback would be greatly appreciated.

to fix this, you have to repupdate all the sprites to start following the closest tower. i reccomend checking out my tutorial for [[Tutorial] Making an Enemy Follow Multiple Sprites :snake:](https://forum.makecode.com/t/tutorial-making-an-enemy-follow-multiple-sprites/33914)

---

<div class="post-metadata">

**Author:** ![cdob10s](https://avatars.discourse-cdn.com/v4/letter/c/3ec8ea/32.png) [@cdob10s](https://forum.makecode.com/u/cdob10s)\
**Post date:** [March 5, 2026, 7:07pm UTC](https://forum.makecode.com/t/group-of-enemies-tracking-sprites/42498/6 "2026-03-05T19:07:28Z")

</div>

Here is the link: [https://makecode.com/\_4RgceT8R2Jai](https://makecode.com/_4RgceT8R2Jai)

---

<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:** [March 5, 2026, 10:51pm UTC](https://forum.makecode.com/t/group-of-enemies-tracking-sprites/42498/7 "2026-03-05T22:51:51Z")

</div>

As I thought!

 ![AI](https://us1.discourse-cdn.com/flex020/uploads/makecode/original/3X/f/5/f50ada46b05cfa65b6a332244f5db541303363fd.png)The chainsaw variable should be “value2” as value2 allows you to refer to ALL enemies.

That solves one of your problems.

---

<div class="post-metadata">

**Author:** ![cdob10s](https://avatars.discourse-cdn.com/v4/letter/c/3ec8ea/32.png) [@cdob10s](https://forum.makecode.com/u/cdob10s)\
**Post date:** [March 5, 2026, 10:51pm UTC](https://forum.makecode.com/t/group-of-enemies-tracking-sprites/42498/8 "2026-03-05T22:51:54Z")

</div>

This worked really well, thank you!
