Help making a finish line

0 favourites
  • 3 posts
From the Asset Store
solution for games like "fruit ninja" and drawing applications
  • 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?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • 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.

  • Thanks for the help. I appreciate it

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)