Help making a finish line

Get help using Construct 2

Post » Sun Mar 24, 2013 2:43 pm

I am making a top down racing game and I dont know how to record laps using a finish line and make it cheat proof. I tried making the finish line "jump through" as you would think, you can still go back over it.
Is there some other way to do this in the event sheet?
Posts: 4
Reputation: 333

Post » Sun Mar 24, 2013 3:06 pm

Most racing games use checkpoints: a simple set of sprites (visible or not) along the way that you have to drive through to be permitted to cross the finish line.

My suggestion would be to use a one-dimensional array that is as long along the x-axis as there are checkpoints (and this can be dynamically assigned at the start of each race by counting the checkpoints). As the player passes each checkpoint, add 1 to the cell in the array determined by the checkpoint's IID.

When the player crosses the finish line, check if the combined total across the array matches the number of checkpoints in the track. Clear the array after crossing the finish line and add one to the number of laps in a variable.
Posts: 912
Reputation: 12,646

Post » Sun Mar 24, 2013 3:13 pm

Thanks for the help. I appreciate it
Posts: 4
Reputation: 333

Return to How do I....?

Who is online

Users browsing this forum: No registered users and 58 guests