A ball goes through a goal and the score goes up by one…the score does not go up if the ball misses the goal
Add a sprite of a ball. Also add a sprite of goal posts (does not have to look like actual goal posts)
Add an object and use the ball sprite. Click add event, key press, space. Drag the blue arrows, under the move tab, into the action section. when the popup appears, type in 45+random(90) in the direction section. Type how fast you want the ball to move in the speed section. Click on add event, other, outside room. Drag jump to the start position, under the move tab, into the action section. When the popup appears, click self, then ok. Then drag the red arrows, under the move tab, into the action section. Click only the square, stop button, when the popup appears.
There are many ways of creating the goal system. I chose to create a goal object. Create an object and use the goal sprite. Click on add event, collision with the ball object. Drag set the score, under the score tab, into the action section. When the popup appears, type 1 in the new score section and tick the relative box. Drag jump to the start position, under the move tab, into the action section. When the popup appears, click on other. Drag the red arrows, under the move tab, into the action section. When the popup appears, click on other.
Test the game by creating a room, and putting a ball at the bottom of the screen, and if you followed my directions, put the goal only at the top. If you put different directions into the blue arrows on the ball, put the goals there.
This is only one way of solving this problem. There are many other ways. My game had a shooter run up and take a random shot. My friends game made the ball stop when you released the space bar. This is a few more examples of how you could solve it.
I needed help with this problem. My teacher helped me by showing me the directions of which the ball should go, if I want it to be random.I would like to thank him for helping me.
My version of this problem.
Version
Add a shooter and a field to the game. It will be a bit more complex, but it can be done. If you need ideas, look at my picture.

