# Loss of life without overlap

**URL:** https://forum.makecode.com/t/loss-of-life-without-overlap/24325
**Category:** AP CS Principles
**Created:** [November 16, 2023, 9:49pm UTC](https://forum.makecode.com/t/loss-of-life-without-overlap/24325 "2023-11-16T21:49:31Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![ketheredge](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/ketheredge/32/4806_2.png) [@ketheredge](https://forum.makecode.com/u/ketheredge)
#### Post date: [November 16, 2023, 9:49pm UTC](https://forum.makecode.com/t/loss-of-life-without-overlap/24325/1 "2023-11-16T21:49:31Z")

</div>

Hi, I have a student who has created a game where if the player overlaps with the cars, the player loses a life. (If the player overlaps with a heart, they gain a life.) Shortly after the game starts, the player automatically loses a life even though the player has not touched a car yet. In debug mode, we can see the program jump to that on overlap event handler even though the player has not touched a car. We cannot, however, figure out how to stop that from happening. Does anyone see something that we are missing? Here is a link -

[Project](https://arcade.makecode.com/S15822-96043-51505-27744)

Thanks in advance!  
Kelli

---

<div class="post-metadata">

### Author: ![KIKIvsIT](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/kikivsit/32/10492_2.png) [@KIKIvsIT](https://forum.makecode.com/u/KIKIvsIT)
#### Post date: [November 16, 2023, 9:53pm UTC](https://forum.makecode.com/t/loss-of-life-without-overlap/24325/2 "2023-11-16T21:53:59Z")

</div>

It looks like the hearts are also set to kind Player, so when a heart overlaps a car, it treats it the same way as when the jaywalker overlaps a car. Try messing with the heart’s Kind and see if that fixes it 🙂

---

<div class="post-metadata">

### Author: ![ketheredge](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/ketheredge/32/4806_2.png) [@ketheredge](https://forum.makecode.com/u/ketheredge)
#### Post date: [November 16, 2023, 11:19pm UTC](https://forum.makecode.com/t/loss-of-life-without-overlap/24325/3 "2023-11-16T23:19:11Z")

</div>

Ah! How did I not see that?! I even talked to him about making sure he had different Kinds for things. 🤦🏻‍♀️Thanks for the quick reply 😄
