Unit 6, Lesson 9 - stop movement

I have a student that wants the movement of the players to stop when the “win screen” is shown. Anyone have an idea about the code for that one? Apparently the players can still move even though the game is “over”.
Thanks,
Margaret

Hi Maggie,

I tell my kids that computers are pretty literal. If you had coded the sprite to move with the counter pattern such as sprite.x = sprite.x +1 and then changed the screen to win, the counter pattern is still running because you have not told the x value to do anything but continually change by adding 1 each time through the loop. So, how would you stop the x value from adding 1 to itself each time through the loop? And, where do want them to stop? Do you want them visible on the screen (an x value of 0-400) or off the screen? Hope that helps:)

~Michelle

2 Likes

Thank you so much. I will share this with my student today and see how it goes.

1 Like