# Need Coding Help

**URL:** <https://forum.makecode.com/t/need-coding-help/37715>\
**Category:** Help\
**Created:** [July 2, 2025, 5:31pm UTC](https://forum.makecode.com/t/need-coding-help/37715 "2025-07-02T17:31:38Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![isaiah27](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/isaiah27/32/19201_2.png) [@isaiah27](https://forum.makecode.com/u/isaiah27)\
**Post date:** [July 2, 2025, 5:31pm UTC](https://forum.makecode.com/t/need-coding-help/37715/1 "2025-07-02T17:31:38Z")

</div>

I’m trying to create an auto-scroller level for my game **Super Color Platformer** … but I have a small problem 😐…

Is there a way for the game to check if the player is off screen? Mainly because this is my first time attempting to build an auto-scroller level…

 ![image](https://us1.discourse-cdn.com/flex020/uploads/makecode/original/3X/f/6/f627dd5aab39c55418724d02d4225e3fd623a9d8.png)

---

<div class="post-metadata">

**Author:** ![mmurray1019](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/mmurray1019/32/23334_2.png) [@mmurray1019](https://forum.makecode.com/u/mmurray1019)\
**Post date:** [July 2, 2025, 6:28pm UTC](https://forum.makecode.com/t/need-coding-help/37715/2 "2025-07-02T18:28:52Z")

</div>

There is a block under scene that makes the camera follow the player.  
Nice drawing!

 ![Screenshot 2025-07-02 at 2.24.45 PM](https://us1.discourse-cdn.com/flex020/uploads/makecode/original/3X/e/d/ed9f825872c9cb79425d24ab165cf0e820c57d2a.jpeg)

---

<div class="post-metadata">

**Author:** ![redSprite](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/redsprite/32/34262_2.png) [@redSprite](https://forum.makecode.com/u/redSprite)\
**Post date:** [July 2, 2025, 8:31pm UTC](https://forum.makecode.com/t/need-coding-help/37715/3 "2025-07-02T20:31:48Z")

</div>

You can have a sprite as big as the screen size and be locked onto the sprite the camera is following

If the player stops overlapping it do whatever you wanna do

---

<div class="post-metadata">

**Author:** ![mAVERICK12](https://avatars.discourse-cdn.com/v4/letter/m/e495f1/32.png) [@mAVERICK12](https://forum.makecode.com/u/mAVERICK12)\
**Post date:** [July 2, 2025, 8:34pm UTC](https://forum.makecode.com/t/need-coding-help/37715/4 "2025-07-02T20:34:50Z")

</div>

Or you could add the scrolling extension and make the sprite not move and… BOOM. It looks like he is walking. (Or what he is doing in your game.) But if you’re ACTALLY moving, do what @mmurray1019 said.

---

<div class="post-metadata">

**Author:** ![Rune](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/rune/32/18951_2.png) [@Rune](https://forum.makecode.com/u/Rune)\
**Post date:** [July 2, 2025, 8:35pm UTC](https://forum.makecode.com/t/need-coding-help/37715/5 "2025-07-02T20:35:54Z")

</div>

I don’t think there is an easy way, but if you get the cameras location then you might be able to see how far away the player is on the x axis by getting the difference between the cameras X and the players X, then checking if it is above or below 80 and -80. (160 is the screen size so 80 is half.)

This was written quickly, if you need a better explanation just ask.

---

<div class="post-metadata">

**Author:** ![mmurray1019](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/mmurray1019/32/23334_2.png) [@mmurray1019](https://forum.makecode.com/u/mmurray1019)\
**Post date:** [July 7, 2025, 6:10pm UTC](https://forum.makecode.com/t/need-coding-help/37715/6 "2025-07-07T18:10:55Z")

</div>

Yes, using a bit of math and an if statement, you can check.

 ![Screenshot 2025-07-02 at 7.53.47 PM](https://us1.discourse-cdn.com/flex020/uploads/makecode/original/3X/c/d/cd1bebb971ebc81abae5054356497cb8c13d40f4.png)  
I inagine there is an extension out there that would do it better though.

---

<div class="post-metadata">

**Author:** ![Reflectfr](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/reflectfr/32/32515_2.png) [@Reflectfr](https://forum.makecode.com/u/Reflectfr)\
**Post date:** [July 7, 2025, 10:19pm UTC](https://forum.makecode.com/t/need-coding-help/37715/7 "2025-07-07T22:19:08Z")

</div>

i know that you can force a player to be in screen

---

<div class="post-metadata">

**Author:** ![Dvplayzty](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/dvplayzty/32/22324_2.png) [@Dvplayzty](https://forum.makecode.com/u/Dvplayzty)\
**Post date:** [July 8, 2025, 12:04am UTC](https://forum.makecode.com/t/need-coding-help/37715/8 "2025-07-08T00:04:42Z")

</div>

Will this help?

> **[Test](https://arcade.makecode.com/S82780-46639-78453-03720)**
>
> Made with ❤️ in Microsoft MakeCode Arcade.

---

<div class="post-metadata">

**Author:** ![isaiah27](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/isaiah27/32/19201_2.png) [@isaiah27](https://forum.makecode.com/u/isaiah27)\
**Post date:** [July 15, 2025, 8:13pm UTC](https://forum.makecode.com/t/need-coding-help/37715/9 "2025-07-15T20:13:21Z")

</div>

PERFECT!

It’s exactly what I envisioned!
