Sprite Movement not working


#1

I am working with a student on her Interactive Greeting card in lesson 14 of CS Discoveries Unit 3. We are having a problem with getting her balloons to fall. We have tried playing with getting her balloons to fall with and without a conditional in the draw loop, but nothing seems to work. Here is a link to her project: https://studio.code.org/projects/gamelab/G7jAyb_xUnr_uaVgPonpefMy0fbzkP0WdQwKa3cgerU

Does anyone know why this isn’t working?

I am attaching some screenshot what we did with the balloon movement code outside the conditional. Regardless of what we do, there is no balloon movement.

Thanks in advanced!

Melissa


#2

Hi Melissa,

drawSprites is being called outside the draw loop instead of inside of it. That means that the sprites are only being drawn once, at the beginning of the program. The sprites are being updated, but not drawn to the screen.

You might suggest that the student think of the sprites as a stamp. You can make changes to them, but you wont see those changes until you actually use the stamp, which is what drawSprites does.

Elizabeth