# My character dies upon completion of the first level?

**URL:** <https://forum.makecode.com/t/my-character-dies-upon-completion-of-the-first-level/20769>\
**Category:** Help\
**Created:** [June 21, 2023, 8:28pm UTC](https://forum.makecode.com/t/my-character-dies-upon-completion-of-the-first-level/20769 "2023-06-21T20:28:19Z")\
**Posts on this page:** 13\
**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:** [June 21, 2023, 8:28pm UTC](https://forum.makecode.com/t/my-character-dies-upon-completion-of-the-first-level/20769/1 "2023-06-21T20:28:19Z")

</div>

whenever the player hits a switch at the end of a level, the screen is supposed to fade to black, switch tilemaps, then fade back in. what actually happens is; the screen fades to black, then i get a game over for seemingly no reason. why?

---

<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:** [June 23, 2023, 1:03am UTC](https://forum.makecode.com/t/my-character-dies-upon-completion-of-the-first-level/20769/2 "2023-06-23T01:03:49Z")

</div>

please help me. i can’t playtest any more levels if i cant get in them without dying. this won’t get done without someone’s help.

---

<div class="post-metadata">

**Author:** ![InvalidProject](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/invalidproject/32/32554_2.png) [@InvalidProject](https://forum.makecode.com/u/InvalidProject)\
**Post date:** [June 23, 2023, 5:01pm UTC](https://forum.makecode.com/t/my-character-dies-upon-completion-of-the-first-level/20769/3 "2023-06-23T17:01:30Z")

</div>

Ill help! If you dont mind, you could send the link

---

<div class="post-metadata">

**Author:** ![jadam5](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/jadam5/32/9261_2.png) [@jadam5](https://forum.makecode.com/u/jadam5)\
**Post date:** [June 23, 2023, 5:02pm UTC](https://forum.makecode.com/t/my-character-dies-upon-completion-of-the-first-level/20769/4 "2023-06-23T17:02:15Z")

</div>

ok send up the game and i will see if i can fix up the code

---

<div class="post-metadata">

**Author:** ![labfox29](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/labfox29/32/9252_2.png) [@labfox29](https://forum.makecode.com/u/labfox29)\
**Post date:** [June 23, 2023, 5:02pm UTC](https://forum.makecode.com/t/my-character-dies-upon-completion-of-the-first-level/20769/5 "2023-06-23T17:02:17Z")

</div>

LINk?

---

<div class="post-metadata">

**Author:** ![Maketendo](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/maketendo/32/27571_2.png) [@Maketendo](https://forum.makecode.com/u/Maketendo)\
**Post date:** [June 23, 2023, 5:02pm UTC](https://forum.makecode.com/t/my-character-dies-upon-completion-of-the-first-level/20769/6 "2023-06-23T17:02:51Z")

</div>

Could you send the code

---

<div class="post-metadata">

**Author:** ![DahbixLP](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/dahbixlp/32/4760_2.png) [@DahbixLP](https://forum.makecode.com/u/DahbixLP)\
**Post date:** [June 23, 2023, 5:02pm UTC](https://forum.makecode.com/t/my-character-dies-upon-completion-of-the-first-level/20769/7 "2023-06-23T17:02:52Z")

</div>

Please send a game link so we can take a look at the code

---

<div class="post-metadata">

**Author:** ![Luke](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/luke/32/32519_2.png) [@Luke](https://forum.makecode.com/u/Luke)\
**Post date:** [June 23, 2023, 5:08pm UTC](https://forum.makecode.com/t/my-character-dies-upon-completion-of-the-first-level/20769/8 "2023-06-23T17:08:10Z")

</div>

Always send your code otherwise no one will understand the issue.

---

<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:** [June 23, 2023, 8:29pm UTC](https://forum.makecode.com/t/my-character-dies-upon-completion-of-the-first-level/20769/9 "2023-06-23T20:29:06Z")

</div>

apologies, everyone. here’s the link.

> **[project hoplings: reborn! (beta 0.1.0)](https://arcade.makecode.com/29547-26100-15448-39963)**
>
> Made with ❤️ in Microsoft MakeCode Arcade.

---

<div class="post-metadata">

**Author:** ![Luke](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/luke/32/32519_2.png) [@Luke](https://forum.makecode.com/u/Luke)\
**Post date:** [June 26, 2023, 3:53pm UTC](https://forum.makecode.com/t/my-character-dies-upon-completion-of-the-first-level/20769/10 "2023-06-26T15:53:29Z")

</div>

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

The game over block is the issue for some reason when I removed it the next level loaded. I would find some alternative solution like using tilemaps.

---

<div class="post-metadata">

**Author:** ![InvalidProject](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/invalidproject/32/32554_2.png) [@InvalidProject](https://forum.makecode.com/u/InvalidProject)\
**Post date:** [June 26, 2023, 4:29pm UTC](https://forum.makecode.com/t/my-character-dies-upon-completion-of-the-first-level/20769/11 "2023-06-26T16:29:53Z")

</div>

welp. Since I suck at code, I don’t know what’s going wrong. Plus, data and y-axis? I’ve never used them. (technically, I have used y-axis, but that doesn’t count.)

---

<div class="post-metadata">

**Author:** ![Brohann](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/brohann/32/17380_2.png) [@Brohann](https://forum.makecode.com/u/Brohann)\
**Post date:** [June 26, 2023, 9:11pm UTC](https://forum.makecode.com/t/my-character-dies-upon-completion-of-the-first-level/20769/13 "2023-06-26T21:11:32Z")

</div>

I know the problem and currently have it fixed. I will releasevthe link when i have fixed the enemies as well

---

<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:** [June 27, 2023, 4:52pm UTC](https://forum.makecode.com/t/my-character-dies-upon-completion-of-the-first-level/20769/14 "2023-06-27T16:52:05Z")

</div>

i figured it out! if i get rid of the y value in favor of {[camera Y] - 0.99}, i can get the same effect regardless of tilemap height!
