O'Reilly logo

Construct Game Development by Daven Bigelow

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Time for action — creating forces

If we just let the ball drop straight down, the game would become very boring and not all green pegs would be hit. We are therefore going to set up the ball launcher, peg, bucket movements, and forces. We'll also create some basic game structure events.

  1. To start, create an Always event in the Game group. The first action for this will be for the BucketCatch object and is called Set position.
  2. Enter the X and Y of Bucket.X and Bucket.Y - 73 (otherwise known as the distance between them, as we measured in the last topic).
  3. Add the action for rotating the ball launcher to the mouse within the angle range of 10 and 170 degrees. Choose the action Set angle for the BallLauncher object and enter Clamp(Angle(BallLauncher.X, ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required