count down timer that counts down faster each round of a race

scitunesscitunes Member, Sous Chef Posts: 4,047
edited November -1 in Working with GS (Mac)
I have made a racing type game in which you race against the clock. You need to get through the race course and complete a challenge each time. I want the timer to reset each lap (pretty sure I know how to do this) but I want the timer to count down faster (or have it set to a lower number) each lap so the game gets progressively harder.

Any thoughts on how to do this?

Thanks, guys!

Comments

  • Fafnir312Fafnir312 Member Posts: 161
    You could always just check the lap count and set the timer interval accordingly.

    If lapCount = 3 then timer = 15 secs
    if lapCount = 4 then timer = 10 secs
    etc...

    It's fairly simple but it ought to work.
  • scitunesscitunes Member, Sous Chef Posts: 4,047
    I was sitting here trying to think why I opted not to do this and it finally came to me. This method will work, but I will need to create rules for all of the possible laps that a player may complete. In my game the end occurs when the player is unable to complete the "challenge" that takes place during each lap before the time runs out. So a really good gamer could theoretically complete more laps than I have rules for. So I have been trying to have a game attribute that works as a multiplier. It starts out at 1 and each lap is lowered by .05. This attribute is then multplied by the timer (which is reset each lap). So lap 1 is 80 sec and lap 2 is 80sec times .95 and lap three is 80secs * .80, etc.. This way I don't have to create a rule for each lap. The problem seems to be that I set the multiplier attribute to an integer which can't be a decimal (duh!) so I think I will change it to a "real" attribute. If that doesn't work I will just bite the bullet and type out rules for each lap as you suggested. So I appreciate the suggestion as it gives me a very usable backup plan if I can't get my method to work. Thanks!
Sign In or Register to comment.