Tennis game help



I'm just starting with hopscotch.

I want to make a tennis game.

I have 2 characters.

When the ball hits them it flips and moves forward. But it only does it once.

So the game lasts one shot each then the ball goes straight through the character and rests against the side.

I tried using repeat but the ball just goes back and forward regardless if it hits the character.

How can I make them continue to hit the ball?

I tried seeing similar games but the code makes no sense to me!



I can help... Try to do "When ball bumps player 1"
"Move forward (how long you want it to go)"


Can I see some screenshots of the code?
I might be able to help :blush:
What is your hopscotch username?





Here is the code (hopefully)

I already have it set to 'bump' but only does it once



Did you make player two make the ball move forward -750?


No, I made it flip and go forward 750


Wait no...


You need to add new values



Delete move forward 750


Ok. I don't understand values. What do I have to do?


I'll show you what to do via screenshot


Thank you very much........


Same code for monkey as octopus


Thank you. I'll try that now


Let me know if it worked


Brilliant that works thanks.
(Although I'm not sure why - if you had time to explain why that works that'd be much appreciated!)

Now just have to get the angle right so it doesn't hit the top or bottom of screen and make the ball move faster and work out how to do scoring!


Nice! This is how it works. Because you had move forward 750, the ball went past the character when the code was still running move forward 750...