# Sprite Overlapping

**URL:** <https://forum.makecode.com/t/sprite-overlapping/45921>\
**Category:** Help\
**Created:** [September 16, 2026, 7:29pm UTC](https://forum.makecode.com/t/sprite-overlapping/45921 "2026-09-16T19:29:14Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Zacharoni](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/zacharoni/32/35303_2.png) [@Zacharoni](https://forum.makecode.com/u/Zacharoni)\
**Post date:** [September 16, 2026, 7:29pm UTC](https://forum.makecode.com/t/sprite-overlapping/45921/1 "2026-09-16T19:29:15Z")

</div>

Was making a little simulator of my game but my player sprites keep overlapping each other and shooting at the same spots. The walking animation for them wasn’t play as well.

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

This was their code to make them automatically move.

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

Press B to place the units.

> **[Zobo](https://arcade.makecode.com/S98974-57036-52239-05462)**
>
> Made with ❤️ in Microsoft MakeCode Arcade.

---

<div class="post-metadata">

**Author:** ![ThatCoder](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/thatcoder/32/29388_2.png) [@ThatCoder](https://forum.makecode.com/u/ThatCoder)\
**Post date:** [September 17, 2026, 9:53pm UTC](https://forum.makecode.com/t/sprite-overlapping/45921/2 "2026-09-17T21:53:12Z")

</div>

I would recommend adding an invisible hitbox to detect for the sprite coming to overlap, then force the sprite to go the other way, if you want, I might be able to do it for you

---

<div class="post-metadata">

**Author:** ![Hulahoop](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/hulahoop/32/25398_2.png) [@Hulahoop](https://forum.makecode.com/u/Hulahoop)\
**Post date:** [September 18, 2026, 2:54am UTC](https://forum.makecode.com/t/sprite-overlapping/45921/3 "2026-09-18T02:54:55Z")

</div>

If you dont want them to overlap. you can use the same block u used for animation but do this:

for element (value) of (array of () tiles) do

Create (your sprite)

place (your sprite) on row ((value)row) and column ((value)column)\

That should work. that how i put it on some on the tiles i want it to be on.

though you’ll have to place tiles on a tile map of where you want them to go. dont fill the entire tilemap with the same tile if you dont want the sprites to be on all of them.
