# Car racing game - finish line scoring question

0 favourites
• 4 posts
From the Asset Store
solution for games like "fruit ninja" and drawing applications
• Hello!

My students are creating a car racing game (similar to the Driving Game template in Construct 2) where there is a finish line at the top of the track. We added a global variable which has a point added to it every time the finish line is crossed. However, we can't figure out a way to prevent the system from adding a point when a car goes backwards over the finish line.

So in other words, a car can go around the track and then get a point, and then go backwards and get another point without going around the track.

Is there an event we can add to prevent this from happening? We tried doing some things with instance variables but couldn't get it to work.

Thank you!

• Would checking the angle of movement of the car when colliding with the finishline work?

• That might work...would that just involve adding another condition to the collision event? I am not sure which angle condition to pick. I tried a few of these yesterday and couldn't get them to work.

• ## Try Construct 3

Develop games in your browser. Powerful, performant & highly capable.

Construct 3 users don't see these ads
• yes all you'd have to do is add a condition.

use the expression - Sprite.Car.MovingAngle to get the moving angle of the car

so for example

system is between angles - angle: Sprite.Car.MovingAngle - first angle: 275 - second angle: 355

would mean the car is moving upward on the layout..

you could ofcourse also check the movingangle with the angle of the finishline, or use is inbetween angles,

• 4 posts