Discuss Scratch
- Discussion Forums
- » Help with Scripts
- » My cube platformer game glitch
- Iobro101
-
18 posts
My cube platformer game glitch
Hi Guys! I have made this topic because I am stuck on a little bit of my cube platformer game and I cannot solve this glitch. Here is the project ( https://scratch.mit.edu/projects/548473361/ ) and it should explain what I need help with here. If you could solve this glitch I would be extremely grateful (and maybe even follow you
) so please have a go. If you don't understand what you need to do you can always leave me a message. Thank you for reading this and bye. This glitch is now solved but scroll down the reply's to help me with a new glitch.
Iobro101

Iobro101
Last edited by Iobro101 (July 1, 2021 17:36:36)
- Thingied
-
1000+ posts
My cube platformer game glitch
The problem is that it keeps on moving the sprite back to -157,-37. To fix this we make it only able to execute once until the next level.

You have to reset the “reset?” variable every time the green flag is clicked and when the player passes on to the next level so that it can reset again.


But now the ground detection is broke on level 2 so just have one loop instead of two and it fixes it.


You have to reset the “reset?” variable every time the green flag is clicked and when the player passes on to the next level so that it can reset again.


But now the ground detection is broke on level 2 so just have one loop instead of two and it fixes it.

- Iobro101
-
18 posts
My cube platformer game glitch
I've done what you said but the project still isn't working for some reason. Check out the project now. The problem is that it keeps on moving the sprite back to -157,-37. To fix this we make it only able to execute once until the next level.https://scratch.mit.edu/projects/548473361/ It has just changed the positioning for some reason
You have to reset the “reset?” variable every time the green flag is clicked and when the player passes on to the next level so that it can reset again.
But now the ground detection is broke on level 2 so just have one loop instead of two and it fixes it.
- Thingied
-
1000+ posts
My cube platformer game glitch
Forgot to mention to remove this loop.I've done what you said but the project still isn't working for some reason. Check out the project now. -snip-https://scratch.mit.edu/projects/548473361/ It has just changed the positioning for some reason

When it's level 2, it's going to keep running thus making the player stuck near the center. You don't need to put loops around everything, keep that in mind when coding.
- Iobro101
-
18 posts
My cube platformer game glitch
Thank you so much that is excellent but sadly there is another glitch. when you are pressing the right or left arrow key and you walk into the black it sends you back to the start. why?
- Thingied
-
1000+ posts
My cube platformer game glitch
Pretty sure you're running into the lava. Only way I could replicate this. Thank you so much that is excellent but sadly there is another glitch. when you are pressing the right or left arrow key and you walk into the black it sends you back to the start. why?
- Discussion Forums
- » Help with Scripts
-
» My cube platformer game glitch