Hello users of Green Foot, it's a pleasure to meet you all.
I have currently made a game where the player can move the ball in 8 directions. But I want the ball to move an x amount of pixels when the space bar has been pressed.
if ( space bar has been pressed && there is collision with the ball from the right)
//Move the ball 50pixels to the right
If (space bar has been pressed && there is collision with the ball from the left)
// move the ball 50pixels to the left
Thank you, can i have some tips on how this can be achieved?

