How do I Code Lap Count in Racing Game?

Get help using Construct 2

Post » Tue Oct 27, 2015 10:05 pm

hey guys, thanks for looking. Im making a racing game. How would you go about coding the finish line/lap line?
If the player or AI cross it, it raises the lap count +1 but how would I keep a player/AI from raising the lap count by simply crossing the line multiple times instead of actually racing the course?
Thanks :)
B
25
S
7
Posts: 79
Reputation: 2,267

Post » Tue Oct 27, 2015 10:15 pm

Checkpoints
Increment an instance checkpoint variable for each racer and only increment checkpoints as last was valid and lapCount for racer if final checkpoint was valid.
Check out my completed games on the Arcade! Capt. Doe Save the Universe! & Clicker Wizard!
B
66
S
17
G
8
Posts: 637
Reputation: 9,370

Post » Tue Oct 27, 2015 10:20 pm

Thanks, Chrisinfinger. I think that's the solution. :)
B
25
S
7
Posts: 79
Reputation: 2,267


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 14 guests