I need help with code

ideas
helpwithcode

#1

So I am on hopscotch, and I have a rule set so

When ● bumps _ then
Increase SCORE by 1

The circle is supposed to bounce back up after hitting the _ (my game is like a ping pong game) but sometimes the score will increase by two. Because it detects the ball twice. I tried making the ball quickly teleport to the bottom of the screen and then continue normally, but that didn't work. So can somebody please help me? :sweat_smile: :confounded:


#2

Maybe add a wait ... Milliseconds in the Bump rule? Idk


#3

Are you sure you didn't accidentally tapped "when is touching"?


#4

Could you give screenshots or a link? That way we can see what you mean and pick apart your code more easier!


#5

Try doing a when circle is touching the ball increase value by 1. Then have the circle bounce back up.


#6

The Bump event should only fire once until the objects stop touching and then touch again. If you can't figure it out, maybe you could publish the project so we can see the code (you can unpublish later).

Are you working with clones? If you had 2 clones (of the __ for example) the bump event for both clones would fire even though the ball only bumps one of them.