Sprite movement

Student created this code. When switching from level 1 to level 2 the sprite(player) appears to be floating and has lost basic movements. Here is their code. I also have another students that this is happening to… I have not seen this before
https://makecode.com/_R5pEDtLPrJ3h

2 Likes

Hello! It looks like the issue the student has is with this block of code right here:


Whenever these conditions are met, the current level being 1 and the score being 1, the level 2 function is called every game update. This repeatedly returns the player position to the start of the level. To fix this, an easy solution would be to increase the current level variable to 2 after you enter the level, like this:

Hope this helps!

1 Like