The information below is from one of my 7th grade students who is having issues with her car not moving in some directions, Timer issues, and the background not looping properly.
Link to the project or level: Game Lab - Code.org
**What I expect to happen:**For the car to move left and right, and the goal is to get to 60 seconds without crashing.
What actually happens: The car will only move to the left, and the timer isn’t working.
**What I’ve tried:**Code has been reviewed and edited with no luck.
On this one, The way she has her conditionals written up, they conflict with each other, so only the last one is used. Because they are one right after the other and both of them have else statements, the computer will try to execute the else statement of one of them when the other is true and the result ends up being no motion.
Here’s how I would reformulate them.
You can see they are combined into a single conditional that can be properly evaluated.
I don’t see any signs of an attempt to create a timer or a scrolling background, so maybe she removed those from her code? If she wants to add those and can’t get them to work, check back in with us with her updated code.
Thank you so much! She is going to try this today in class.