Discuss Scratch

metalfire8
Scratcher
2 posts

Scoring Glitch

I have this game I made from the pong tutorial that scores a point when the planet(ball) hits the paddle. Whenever it touches the red part at the bottom it takes a point away. But for some reason it gets rid of more than one point when the planet hits the part at an angle. Can someone help me fix this and tell me why it does this?

Game:Planet Bounce

Last edited by metalfire8 (Oct. 30, 2016 17:07:12)

drmcw
Scratcher
1000+ posts

Scoring Glitch

You have a forever loop containing if touching red then reduce score by 1. The forever loop runs its scripts 30 times per second. Unless the planet is only touching red for 1/30 second then you'll lose 1 point otherwise much more. If you want to limit things to 1 point when in the red then add in something like
wait until <not <touching color [#ff0000] ?>>
after you subtract the point.

10 !
ScratchVaders or Galaga?
Maybe Eliza can help you decide?
metalfire8
Scratcher
2 posts

Scoring Glitch

drmcw wrote:

You have a forever loop containing if touching red then reduce score by 1. The forever loop runs its scripts 30 times per second. Unless the planet is only touching red for 1/30 second then you'll lose 1 point otherwise much more. If you want to limit things to 1 point when in the red then add in something like
wait until <not <touching color [#ff0000] ?>>
after you subtract the point.

Thanks. Also when the planet goes too fast it goes through the paddle.

Powered by DjangoBB