Score help

Billyd1Billyd1 Member Posts: 133
edited November -1 in Working with GS (Mac)
So basically I have a 'Score' which shows the score, but now I want to add a 'All Time Score' page with displays the score collected throughout the playing time.

I want the 'Score' to add to the 'All Time Score' after every level.

So for example:

`
When attribute > 'Score' = 'Score+1'

Change attribute > 'AllTimeScore' to 'AllTimeScore+1'
`
I tried this but it didn't work does anyone know of a way?

I dont really want to have to go through the whole game adding:

`
When 'actor' overlaps with 'actor'

Change 'AllTimeScore' to 'AllTimeScore+1'
`
So basically when the 'score' = +1 I want the 'all time score' to +1 aswell

Comments

  • quantumsheepquantumsheep Member Posts: 8,188
    If score is greater than alltimescore

    constrain alltimescore to score.

    That should do it!

    QS :D

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

  • Billyd1Billyd1 Member Posts: 133
    quantumsheep said:
    If score is greater than alltimescore

    constrain alltimescore to score.

    That should do it!

    QS :D

    That worked great but, that works like a high score system. I need the 'Score' to add to the 'AllTimeScore' after every level.

    So here an example:

    I play level 1 and get a score of 100.

    I then play level 2 and get a score of 80.

    Now the 'AllTimeScore' should display 180.
  • quantumsheepquantumsheep Member Posts: 8,188
    Ok - so you have an attribute called 'score'.

    On each new level, in your controller actor, have a 'change attribute score = 0' behaviour - this resets the value from a previous scene, if there was one.

    When you finish a level, have a rule that says:

    Change Alltimescore to Alltimescore + Score

    Does that help?

    QS :D

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

  • Billyd1Billyd1 Member Posts: 133
    Thanks quantumsheep that worked great!
  • quantumsheepquantumsheep Member Posts: 8,188
    No problem!

    The bit below was something Butterbean told me. I pass it on to you, and I'm sure you'll help someone with similar problems in the future!

    We all pay it forward as it were!

    Good luck with your game!

    QS :D
    quantumsheep said:
    If score is greater than alltimescore

    constrain alltimescore to score.

    That should do it!

    QS :D

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

Sign In or Register to comment.