Scoring System+Timer

jbrown2177jbrown2177 Member Posts: 66
edited November -1 in Working with GS (Mac)
I would like to know how to keep the score the same after the timer has run out? I already know how to display both the timer and score, but how do you keep a players score the same after the timer has run out? I was still able to score 10 points on my demo after my time was up.

Comments

  • quantumsheepquantumsheep Member Posts: 8,188
    The way I'd do it, and it's probably not the most efficient way, is to have a boolean variable called 'TimerActive'.

    Then, have a rule that says:

    If timerActive is true, and player does something that gives him points, give the player some points!

    On the timer, have a rule that says when timer runs out, change timer active to false.

    That way you only get points while the timer is active.

    Make sense?

    Hope that helps,

    QS :)

    Dr. Sam Beckett never returned home...
    Twitter: https://twitter.com/Quantum_Sheep
    Web: https://quantumsheep.itch.io

  • jbrown2177jbrown2177 Member Posts: 66
    Makes sense, but what if all you got was say 10 points and the timer runs out? Then that would be your high score for the game. I want it to save the state of the score, but if you score within the time limit it will take you to the next stage with the points you scored on the first stage. So basically it's a cumulative scoring system I want to have.
  • jbrown2177jbrown2177 Member Posts: 66
    Anyone know the answer to my previous question? I've studied other examples in other people games, but the timer and score seem to reset. I want to score to be a saved state if possible. Also during my test I was still able to score points after the time was up, I want to stop that from happening. Any assistance in this matter would be appreciated.
Sign In or Register to comment.