# Sprite stops overlap

**URL:** <https://forum.makecode.com/t/sprite-stops-overlap/2759>\
**Category:** Help\
**Created:** [July 13, 2020, 5:53pm UTC](https://forum.makecode.com/t/sprite-stops-overlap/2759 "2020-07-13T17:53:54Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![GameGod](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/gamegod/32/2756_2.png) [@GameGod](https://forum.makecode.com/u/GameGod)\
**Post date:** [July 13, 2020, 5:53pm UTC](https://forum.makecode.com/t/sprite-stops-overlap/2759/1 "2020-07-13T17:53:54Z")

</div>

Is there a way to make a tilemap where when you touch the ground you lose, but if you touch the ground while overlapping another sprite, you don’t?

(I don’t want to make the sprite a tile)

---

<div class="post-metadata">

**Author:** ![richard](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/richard/32/5417_2.png) [@richard](https://forum.makecode.com/u/richard)\
**Post date:** [July 13, 2020, 6:27pm UTC](https://forum.makecode.com/t/sprite-stops-overlap/2759/2 "2020-07-13T18:27:16Z")

</div>

Something like this?

 ![Screen Shot 2020-07-13 at 11.27.00 AM](https://us1.discourse-cdn.com/flex020/uploads/makecode/original/2X/d/dfe189ae56f36dfe1f3e159f7f38f1866c96b884.png)

---

<div class="post-metadata">

**Author:** ![GameGod](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/gamegod/32/2756_2.png) [@GameGod](https://forum.makecode.com/u/GameGod)\
**Post date:** [July 13, 2020, 6:28pm UTC](https://forum.makecode.com/t/sprite-stops-overlap/2759/3 "2020-07-13T18:28:13Z")

</div>

I tried that, but it didn’t work.

---

<div class="post-metadata">

**Author:** ![GameGod](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/gamegod/32/2756_2.png) [@GameGod](https://forum.makecode.com/u/GameGod)\
**Post date:** [July 13, 2020, 6:28pm UTC](https://forum.makecode.com/t/sprite-stops-overlap/2759/4 "2020-07-13T18:28:48Z")

</div>

By the way the `Overlap sprite` is moving.

---

<div class="post-metadata">

**Author:** ![richard](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/richard/32/5417_2.png) [@richard](https://forum.makecode.com/u/richard)\
**Post date:** [July 13, 2020, 6:39pm UTC](https://forum.makecode.com/t/sprite-stops-overlap/2759/5 "2020-07-13T18:39:51Z")

</div>

Can you share your code?

---

<div class="post-metadata">

**Author:** ![GameGod](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/gamegod/32/2756_2.png) [@GameGod](https://forum.makecode.com/u/GameGod)\
**Post date:** [July 13, 2020, 6:40pm UTC](https://forum.makecode.com/t/sprite-stops-overlap/2759/6 "2020-07-13T18:40:35Z")

</div>

> **[Raft](https://arcade.makecode.com/77518-60752-09469-29950)**
>
> Made with ❤️ in Microsoft MakeCode Arcade.

The game is to stay on the rafts.

---

<div class="post-metadata">

**Author:** ![richard](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/richard/32/5417_2.png) [@richard](https://forum.makecode.com/u/richard)\
**Post date:** [July 13, 2020, 6:48pm UTC](https://forum.makecode.com/t/sprite-stops-overlap/2759/7 "2020-07-13T18:48:43Z")

</div>

If you have multiple projectiles, you’ll need to loop over all of them:

 ![Screen Shot 2020-07-13 at 11.48.21 AM](https://us1.discourse-cdn.com/flex020/uploads/makecode/original/2X/1/1f315f10552b4cc5423a12464ed081e740398802.png)

---

<div class="post-metadata">

**Author:** ![GameGod](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/gamegod/32/2756_2.png) [@GameGod](https://forum.makecode.com/u/GameGod)\
**Post date:** [July 13, 2020, 6:49pm UTC](https://forum.makecode.com/t/sprite-stops-overlap/2759/8 "2020-07-13T18:49:32Z")

</div>

Thanks!

---

<div class="post-metadata">

**Author:** ![cosmoscowboy](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/cosmoscowboy/32/1718_2.png) [@cosmoscowboy](https://forum.makecode.com/u/cosmoscowboy)\
**Post date:** [October 7, 2020, 9:44pm UTC](https://forum.makecode.com/t/sprite-stops-overlap/2759/9 "2020-10-07T21:44:08Z")

</div>

Your reply should answer a question I have here, I just wanted to check.

> [@Sprite overlap and tiles](https://forum.makecode.com/t/sprite-overlap-and-tiles/3806):
>
> I am working on a remake of the retro classic ‘Frogger’. [[Arcade Game: Frogger (1981 Konami)] ](https://www.youtube.com/watch?v=WNrz9_Fe-Us) I have a question regarding to the overlapping of sprites and the position of tiles. My question relates to the part of the the game where the players jumps onto the logs moving across the water. I know I can check when the player overlaps a log, but I’m not know sure how to check when it moves off. I am only using block code. If you have any ideas I would love to hear for you. frog

---

<div class="post-metadata">

**Author:** ![richard](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/richard/32/5417_2.png) [@richard](https://forum.makecode.com/u/richard)\
**Post date:** [October 7, 2020, 11:26pm UTC](https://forum.makecode.com/t/sprite-stops-overlap/2759/10 "2020-10-07T23:26:25Z")

</div>

Yep, that will work!

---

<div class="post-metadata">

**Author:** ![cosmoscowboy](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/cosmoscowboy/32/1718_2.png) [@cosmoscowboy](https://forum.makecode.com/u/cosmoscowboy)\
**Post date:** [October 9, 2020, 8:05pm UTC](https://forum.makecode.com/t/sprite-stops-overlap/2759/11 "2020-10-09T20:05:11Z")

</div>

Another question if I may please related to the logs. I have a tile map and the logs have different widths. Since I don’t want a log four tiles wide to disappear if it hits a wall, does that mean I have to place 4 single tile logs next to each other? Do any two sprites not overlap if one of them is a ghost? Or is that dependent upon how you set the ‘on sprite’ overlap event?

log is ghost  
on sprite of kind ‘log’ overlaps sprite of kind ‘player’ (this will not work, right)  
on sprite of kind ‘player’ overlaps sprite of kind ‘log’ (will this work?)

---

<div class="post-metadata">

**Author:** ![Dreadmask197](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/dreadmask197/32/10494_2.png) [@Dreadmask197](https://forum.makecode.com/u/Dreadmask197)\
**Post date:** [October 9, 2020, 8:33pm UTC](https://forum.makecode.com/t/sprite-stops-overlap/2759/12 "2020-10-09T20:33:08Z")

</div>

They will not overlap if one sprite is a ghost

---

<div class="post-metadata">

**Author:** ![cosmoscowboy](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/cosmoscowboy/32/1718_2.png) [@cosmoscowboy](https://forum.makecode.com/u/cosmoscowboy)\
**Post date:** [October 9, 2020, 10:41pm UTC](https://forum.makecode.com/t/sprite-stops-overlap/2759/13 "2020-10-09T22:41:15Z")

</div>

Thanks for the tip. I should have just tested my theory.
