playMaker

Author Topic: Lap system with checkpoint for racing game  (Read 2603 times)

LogLady

  • Full Member
  • ***
  • Posts: 150
Lap system with checkpoint for racing game
« on: May 26, 2014, 07:31:22 PM »
Hi!

I'm trying to make a lap system using the checkpoint system that comes with the arraymaker samples but couldn't figure how to prevent "user cheating" because if the player pass over the last checkpoint (the one that subtract the lap counter) without crossing other checkpoints before it still counts a lap as complete. I followed this video and script ( and tried to do the same using Playmaker but couldn't go too far. Can someone help me?

1982

  • Junior Playmaker
  • **
  • Posts: 71
Re: Lap system with checkpoint for racing game
« Reply #1 on: May 27, 2014, 02:38:32 AM »
Some ideas:

Make a system where next checkpoint is only activated when player is at previous checkpoint.

Give every checkpoint a bool value, and when player is at last checkpoint/finish line compare these bools using "Bool All True".

Make every checkpoint add a '1' to a Int-variable, and when at finish compare if the total Int value is large enough.




LogLady

  • Full Member
  • ***
  • Posts: 150
Re: Lap system with checkpoint for racing game
« Reply #2 on: May 27, 2014, 02:31:34 PM »
@1982

Wouldn't be necessary to script every checkpoint to check if it was activated or not and, for every track, set the int on the "finish line"? I think that it's ok if you use 5 checkpoints or every track has the same number of checkpoints but, lets say, we need 40 checkpoints on one track, 5 on a next track and so on. The way described on the video in the first post I just need to prefill the array, no matter how many checkpoints exists on each track.