Need help with scoring game

Hi, I am trying to make the game give a point everytime the ball touches the girl. I created a variable for score, and set a conditional to increase the score everytime the ball bounces of the girl, but when I test it in the debug, it does not change the score correctly. Thanks for any help you all can give, link is below.

https://studio.code.org/projects/gamelab/GQb4qh9lmJ0TDi_BmKAOoKgX5pXbUnjjeQJyi-Duh7Y

@neville.e.voglezonjr,

I believe that bounceOff will cause the ball to bounce, but it isn’t an event you would put in a conditional block to detect the bounce. Instead, try the “isTouching” block.

See if that does what you want! Good luck!

Mike

Hi, thanks for the reply! I actually started with “isTocuhing” and that did not work correctly, then I tried “bounceOff”

@neville.e.voglezonjr,

I moved the “isTouching” block above the bounceOff block and the score works now. I think the ball was immediately bouncing and then before the isTouching block could run, the ball was no longer touching (milliseconds later).

Good luck!

Mike

1 Like

Hi, thanks I moved the position of the block and it seems to be keeping score correctly now. Thanks for your help!

1 Like