Sprites not moving with velocity

Trying to help a student with their project in Game Lab.

After score = 10 and space is pressed, the startMovement function should begin. The obstacle, target, and player should move down the screen.

The watcher shows all three velocities are set according to the startMovement() function but the sprites are not moving.

We’ve tried changing the order of the conditionals and the types of conditionals. We tried using variables to store boolean values to be used in the conditionals. We tried changing the order of the functions.

@tjdavis,

It looks like a very fun game!

If you look at your code, you run the setCharacters function to put the characters where you want them and then you use the startMovement() function to set them in motion, but they are in the draw loop, so as soon as you run startMovement, the whole thing loops and you run the setCharacters function again and it puts them right back in their initial spot.

You may want to create a level variable that checks to see if you are on level 1. If so, it sets the characters and starts movement, etc. BUT if already on level 2, it doesn’t set the characters again.

Hopefully that’s enough of an idea to get you started, but if not, check back in and we can try to help further!

Mike