Help Me Please

IncrediboIncredibo Member Posts: 274
edited November -1 in Working with GS (Mac)
Hello,
I am doing my Level Unlocking & Display HighScore over the level number & how do I put once started again reset because I play it once then go back and my score is supposte to be 10(the highest) but if i Get 10 twice it show's the score as 20

Help Me

Regards,
BG

Comments

  • jonmulcahyjonmulcahy Member, Sous Chef Posts: 10,408
    For collectables or scoring I have 2 attributes, total score and current score. Current score tracks any points in the level, and if I hit reset it gets set back to zero. Upon level completion I add current score to total score and save it.

    When I display the score in the level, I display total+current score so it's up to date
  • IncrediboIncredibo Member Posts: 274
    how do you make it reset automaticlly once you go to the next level
  • quantumsheepquantumsheep Member Posts: 8,188
    bogarza said:
    how do you make it reset automaticlly once you go to the next level

    In a controller actor for each level, you could just put in a change attribute behaviour at the top that changes the current score to 0.

    This way, whenever you reset the scene (either through 'reset scene' or 'change scene to the same scene'), GS reads that single change attribute behaviour and sets the current score to 0.

    Hope that helps!

    QS :D
  • IncrediboIncredibo Member Posts: 274
    So on my flag to get to the next level I already have the save highscore attribute
    & after that I put change atribute to 0??

    Regards,
    Bo Garza
  • mynameisacemynameisace Hull, UKMember Posts: 2,484
    Yeah, that'd work

    Ace
  • quantumsheepquantumsheep Member Posts: 8,188
    As Ace says, that would work.

    If you need to restart a level though, it'd be useful to be able to reset the current score to 0.

    You can do this in the way I mentioned, or do it by putting the 'change current score to 0' change behaviour into your reset button, within a rule for a button press.

    Cheers,

    QS :D
  • IncrediboIncredibo Member Posts: 274
    Nope didn't work):
  • IncrediboIncredibo Member Posts: 274
    let me try your way QS(:
Sign In or Register to comment.