# Upon Overlap Game "Should be" Over

**URL:** <https://forum.makecode.com/t/upon-overlap-game-should-be-over/11791>\
**Category:** Help\
**Created:** [January 19, 2022, 10:53pm UTC](https://forum.makecode.com/t/upon-overlap-game-should-be-over/11791 "2022-01-19T22:53:52Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![BruceSchwa](https://avatars.discourse-cdn.com/v4/letter/b/9dc877/32.png) [@BruceSchwa](https://forum.makecode.com/u/BruceSchwa)\
**Post date:** [January 19, 2022, 10:53pm UTC](https://forum.makecode.com/t/upon-overlap-game-should-be-over/11791/1 "2022-01-19T22:53:52Z")

</div>

When the shark overlaps with hero the game is supposed to be over; however, it doesn’t seem to be working. Is it because the shark isn’t overlapping all the way over hero? If so, how does my student fix it. We can’t seem to figure it out. Seems like it would be the “change x/y by \_\_” block, but that doesn’t seem to be working. [https://arcade.makecode.com/#editor](https://arcade.makecode.com/#editor)

---

<div class="post-metadata">

**Author:** ![personalnote](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/personalnote/32/31359_2.png) [@personalnote](https://forum.makecode.com/u/personalnote)\
**Post date:** [January 20, 2022, 5:43pm UTC](https://forum.makecode.com/t/upon-overlap-game-should-be-over/11791/2 "2022-01-20T17:43:48Z")

</div>

you need to post the actual link to the game, otherwise, we won’t have access to the game. What you posted was a link to the editor. you can do this by sharing the game in the top left corner.

Have you tried changing the shark’s sprite type to (Enemy) and then put an (if sprite of kind player overlaps with sprite of kind enemy) block then (game over = on).

I also doubt there is anything to do with the (change x/y by ) block, as sprites overlap the each other the moment they make contact (this may not be true, but this is from what I’ve experienced).

---

<div class="post-metadata">

**Author:** ![BruceSchwa](https://avatars.discourse-cdn.com/v4/letter/b/9dc877/32.png) [@BruceSchwa](https://forum.makecode.com/u/BruceSchwa)\
**Post date:** [January 20, 2022, 7:00pm UTC](https://forum.makecode.com/t/upon-overlap-game-should-be-over/11791/3 "2022-01-20T19:00:59Z")

</div>

Sorry about that! [https://makecode.com/\_TivP4tHo5RyV](https://makecode.com/_TivP4tHo5RyV). Thanks for your help. I am new to this and trying to help my students.

---

<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:** [January 20, 2022, 7:05pm UTC](https://forum.makecode.com/t/upon-overlap-game-should-be-over/11791/4 "2022-01-20T19:05:42Z")

</div>

Ah, looks like you mixed up the overlaps blocks!

This code here:

 ![Screen Shot 2022-01-20 at 11.03.29 AM](https://us1.discourse-cdn.com/flex020/uploads/makecode/original/2X/2/2e402dfa21c74e7dd4924c5effedbbac8ca3e146.png)

Is checking for overlaps between a sprite and a tile, not a sprite and a sprite.

You want to check for overlaps between two sprites, and the best way to do that is to use the overlaps event in the sprites category like this:

 ![Screen Shot 2022-01-20 at 11.03.44 AM](https://us1.discourse-cdn.com/flex020/uploads/makecode/original/2X/b/b243a304633e747c844d07c7b026d72286ffbfbd.png)
