# How do i make it so my character dies when it hits the bottom of the screen?

**URL:** <https://forum.makecode.com/t/how-do-i-make-it-so-my-character-dies-when-it-hits-the-bottom-of-the-screen/18961>\
**Category:** Help\
**Created:** [April 5, 2023, 5:41pm UTC](https://forum.makecode.com/t/how-do-i-make-it-so-my-character-dies-when-it-hits-the-bottom-of-the-screen/18961 "2023-04-05T17:41:08Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Brainstorm\_Studios](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/brainstorm_studios/32/20476_2.png) [@Brainstorm\_Studios](https://forum.makecode.com/u/Brainstorm_Studios)\
**Post date:** [April 5, 2023, 5:41pm UTC](https://forum.makecode.com/t/how-do-i-make-it-so-my-character-dies-when-it-hits-the-bottom-of-the-screen/18961/1 "2023-04-05T17:41:08Z")

</div>

I want to know how to make the bottomless pits from traditional platformers without making kill tiles at the bottom of the tilemap. Any suggestions?

---

<div class="post-metadata">

**Author:** ![Samsano](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/samsano/32/8307_2.png) [@Samsano](https://forum.makecode.com/u/Samsano)\
**Post date:** [April 5, 2023, 8:04pm UTC](https://forum.makecode.com/t/how-do-i-make-it-so-my-character-dies-when-it-hits-the-bottom-of-the-screen/18961/2 "2023-04-05T20:04:41Z")

</div>

Would this work?

> **[die when touching ground](https://arcade.makecode.com/S73524-39336-54298-62973)**
>
> Made with ❤️ in Microsoft MakeCode Arcade.

---

<div class="post-metadata">

**Author:** ![randomuser](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/randomuser/32/32505_2.png) [@randomuser](https://forum.makecode.com/u/randomuser)\
**Post date:** [April 5, 2023, 8:06pm UTC](https://forum.makecode.com/t/how-do-i-make-it-so-my-character-dies-when-it-hits-the-bottom-of-the-screen/18961/3 "2023-04-05T20:06:16Z")

</div>

If sprite y is less than 16, game over!

---

<div class="post-metadata">

**Author:** ![BoostedGames](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/boostedgames/32/29419_2.png) [@BoostedGames](https://forum.makecode.com/u/BoostedGames)\
**Post date:** [April 5, 2023, 8:06pm UTC](https://forum.makecode.com/t/how-do-i-make-it-so-my-character-dies-when-it-hits-the-bottom-of-the-screen/18961/4 "2023-04-05T20:06:45Z")

</div>

you could extend the tilemap and put a tile that is made for deaths

---

<div class="post-metadata">

**Author:** ![Brainstorm\_Studios](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/brainstorm_studios/32/20476_2.png) [@Brainstorm\_Studios](https://forum.makecode.com/u/Brainstorm_Studios)\
**Post date:** [April 5, 2023, 11:18pm UTC](https://forum.makecode.com/t/how-do-i-make-it-so-my-character-dies-when-it-hits-the-bottom-of-the-screen/18961/5 "2023-04-05T23:18:16Z")

</div>

Im specifically trying to avoid that…

---

<div class="post-metadata">

**Author:** ![Brainstorm\_Studios](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/brainstorm_studios/32/20476_2.png) [@Brainstorm\_Studios](https://forum.makecode.com/u/Brainstorm_Studios)\
**Post date:** [April 6, 2023, 5:03pm UTC](https://forum.makecode.com/t/how-do-i-make-it-so-my-character-dies-when-it-hits-the-bottom-of-the-screen/18961/6 "2023-04-06T17:03:22Z")

</div>

Heres the code.

> **[spring break-out! — a bright and sunny platformer](https://arcade.makecode.com/S18214-51732-70351-27233)**
>
> Made with ❤️ in Microsoft MakeCode Arcade.

---

<div class="post-metadata">

**Author:** ![neintoes](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/neintoes/32/8315_2.png) [@neintoes](https://forum.makecode.com/u/neintoes)\
**Post date:** [April 7, 2023, 10:16pm UTC](https://forum.makecode.com/t/how-do-i-make-it-so-my-character-dies-when-it-hits-the-bottom-of-the-screen/18961/7 "2023-04-07T22:16:50Z")

</div>

In my opinion the better way would absolutely be to utilise invisible tiles on your tilemap (out of curiosity, why do you want to avoid doing this with the tilemap?).

Otherwise you could track the y position, although this isn’t ideal as it would be a pain to implement multiple ‘fall heights’.

But that would look like this:

> **[spring break-out! — a bright and sunny platformer](https://arcade.makecode.com/S72007-94130-10871-63539)**
>
> Made with ❤️ in Microsoft MakeCode Arcade.

![image](https://us1.discourse-cdn.com/flex020/uploads/makecode/original/2X/5/56ccc082a958f7af9b375e466364638f5af02665.png)

---

<div class="post-metadata">

**Author:** ![Brainstorm\_Studios](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/brainstorm_studios/32/20476_2.png) [@Brainstorm\_Studios](https://forum.makecode.com/u/Brainstorm_Studios)\
**Post date:** [April 10, 2023, 6:26pm UTC](https://forum.makecode.com/t/how-do-i-make-it-so-my-character-dies-when-it-hits-the-bottom-of-the-screen/18961/8 "2023-04-10T18:26:10Z")

</div>

Thanks! And to answer your question, i want the character to die when it hits the absolute bottom of the screen. If i use death tiles, they’ll die a tile above where i want them to, which is a lot more unforgiving.
