# Tile Overlap Firing 2 times

**URL:** <https://forum.makecode.com/t/tile-overlap-firing-2-times/34572>\
**Category:** Arcade\
**Created:** [March 13, 2025, 10:13pm UTC](https://forum.makecode.com/t/tile-overlap-firing-2-times/34572 "2025-03-13T22:13:25Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![michaelcaplan](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/michaelcaplan/32/14780_2.png) [@michaelcaplan](https://forum.makecode.com/u/michaelcaplan)\
**Post date:** [March 13, 2025, 10:13pm UTC](https://forum.makecode.com/t/tile-overlap-firing-2-times/34572/1 "2025-03-13T22:13:25Z")

</div>

Hi there,

Trying to work through a time overlap problem. When a player falls and hits a “bottom” tile, the player then should be teleported to the start, and 1 single life should be removed. I am instead sometimes seeing two lives being removed.

I reduced the problem to the simple project:

> **[tile overlap](https://arcade.makecode.com/11239-75718-88974-19099)**
>
> Made with ❤️ in Microsoft MakeCode Arcade.

I think I see the issue, just not sure how to handle it. The sprite is hitting two of the bottom tiles at the same time, resulting in the overlap event firing twice.

How can I code this so that the overlap event only fires once (or the lives is only reduced by one)?

---

<div class="post-metadata">

**Author:** ![CodeOnTheCob](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/codeonthecob/32/19306_2.png) [@CodeOnTheCob](https://forum.makecode.com/u/CodeOnTheCob)\
**Post date:** [March 13, 2025, 10:58pm UTC](https://forum.makecode.com/t/tile-overlap-firing-2-times/34572/2 "2025-03-13T22:58:00Z")

</div>

put a pause block in the container maybe that will help

---

<div class="post-metadata">

**Author:** ![CodeOnTheCob](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/codeonthecob/32/19306_2.png) [@CodeOnTheCob](https://forum.makecode.com/u/CodeOnTheCob)\
**Post date:** [March 13, 2025, 10:59pm UTC](https://forum.makecode.com/t/tile-overlap-firing-2-times/34572/3 "2025-03-13T22:59:47Z")

</div>

![arcade-fixed-by-CodeOnTheCob](https://us1.discourse-cdn.com/flex020/uploads/makecode/original/3X/b/2/b2101794a5c4e53700dda83d14731da7971a1a84.png)

---

<div class="post-metadata">

**Author:** ![platformermaster](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/platformermaster/32/16102_2.png) [@platformermaster](https://forum.makecode.com/u/platformermaster)\
**Post date:** [March 14, 2025, 5:14pm UTC](https://forum.makecode.com/t/tile-overlap-firing-2-times/34572/4 "2025-03-14T17:14:12Z")

</div>

2 options

1 use a forever block and do if tile to center of mysprite is (the kill tile)

2 Once you hit the tile it doesn’t take away a life, instead it imeadatly teleports you to a real kill tile in a top corner.

---

<div class="post-metadata">

**Author:** ![CodeOnTheCob](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/codeonthecob/32/19306_2.png) [@CodeOnTheCob](https://forum.makecode.com/u/CodeOnTheCob)\
**Post date:** [March 15, 2025, 5:59pm UTC](https://forum.makecode.com/t/tile-overlap-firing-2-times/34572/5 "2025-03-15T17:59:11Z")

</div>

it tried that it was laggy so use game update instead 20ms

---

<div class="post-metadata">

**Author:** ![BotWarrior](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/botwarrior/32/25328_2.png) [@BotWarrior](https://forum.makecode.com/u/BotWarrior)\
**Post date:** [March 17, 2025, 3:21am UTC](https://forum.makecode.com/t/tile-overlap-firing-2-times/34572/6 "2025-03-17T03:21:09Z")

</div>

@michaelcaplan sorry if this is a bit late, but there is an extension called timers, which allows you to put this block and it will limit the amount of times you can get hit. Tell me if this helps.

 ![Screenshot 2025-03-16 at 06.53.07](https://us1.discourse-cdn.com/flex020/uploads/makecode/original/3X/5/3/53706a8f430d95d985e895328b0a004616563440.png)

---

<div class="post-metadata">

**Author:** ![michaelcaplan](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/michaelcaplan/32/14780_2.png) [@michaelcaplan](https://forum.makecode.com/u/michaelcaplan)\
**Post date:** [March 23, 2025, 9:31pm UTC](https://forum.makecode.com/t/tile-overlap-firing-2-times/34572/7 "2025-03-23T21:31:44Z")

</div>

Thanks everyone for your thoughts on this subject

@CodeOnTheCob your solution in the game loop worked really well.

I’ll check out the timers extension @BotWarrior

---

<div class="post-metadata">

**Author:** ![CodeOnTheCob](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/codeonthecob/32/19306_2.png) [@CodeOnTheCob](https://forum.makecode.com/u/CodeOnTheCob)\
**Post date:** [March 25, 2025, 10:24pm UTC](https://forum.makecode.com/t/tile-overlap-firing-2-times/34572/8 "2025-03-25T22:24:33Z")

</div>

k thanks
