Student's Background Sprite won't appear correctly


#1

I have a student that has a very complex game, but is having trouble with his background. When the score reaches 100 he wants to change the background to a sprite background, but when it happens the score and lives dissapear. Any thoughts on helping him?


#3

Lindsey,

Understood and stand by - called in for help!

Brad


#4

It looks like when the score hits 100 the student is using a sprite for the background instead of just relying on the background() command. This means that the background sprite is getting drawn with drawSprites() on line 78, which is after the score is being drawn on the screen. I might point the student towards the fact that they’re using a sprite as the background, and how that changes the order in which the background shows up in the stack. From there they should be able to move the code that draws the score and move it after drawSprites() in the draw loop.