Total Game Score

fedifedi Member, PRO Posts: 31
edited November -1 in Working with GS (Mac)
hi,

im using this method ( http://gamesalad.com/game/3468) from tshirtbooth for my Highscores . And is working fine, but what i want to have is a Total of the HighScores. Because in my Game i want that the player needs a specific Total game score to unlock the next lvl. Any Ideas how i can add this ? ore must i really create an attribute for each lvl ??
thx

Comments

  • DrGlickertDrGlickert Member Posts: 1,135
    I'd use a boolean attribute for the scene being over, meaning whatever you have to complete the level, kill all the enemies, eliminate all the blocks, etc, and set it to false. When the level is completed set this to TRUE.

    Then, have a rule that has;
    When scene complete = TRUE AND game.TotalScore > 1000 (for example) points then Change Scenes AND change attribute game.sceneover to false, otherwise, reset scene AND change attribute game.sceneover to false, AND change attribute game.TotalScore to 0.

    On the next level, you can edit the specific actor that has this code in their behaviors. So you would edit the specific actor (where you click the locked icon to "unlock" that actor), and make the score that the player has to achieve to whatever you want it to be.

    If that doesn't work, let me know.
  • fedifedi Member, PRO Posts: 31
    Hi, thx for the reply, but my problem is i don't know how to make the Total from all the Highscores. In my game i have like in the demo for each lvl a different Higscore, which works fine. But no idea how i can display the total of these three Highscores
  • DrGlickertDrGlickert Member Posts: 1,135
    I'm still confused, are you wanting to display like a top 3 high scores? Or, just have a running total of the high scores?

    If you want a top 3 high scores you'll need to do this;
    Have 3 attributes High Score 1, High Score 2, High Score 3. Then have a rule where if Total Score is > high score 1, then change attribute high score 1 to Total score, change attribute high score 2 to high score 1, change attribute high score 3 to high score 2.

    Next rule would be if Total score is > high score 2 AND < high score 1, then change attribute high score 2 to Total Score, change attribute high score 3 to high score 2.

    If you want to do a total game score over the course of a few levels then you'll need to make 2 attributes;
    One attribute for the scene score (which will need to be reset each scene and one for a Grand Total Score. At the end of the scene you'll need to change attribute Grand Total Score to (Grand Total Score + Scene Score), then when the next scene starts you'll need a rule on an actor that sets Scene score to 0.

    Does that answer your question?
  • DrGlickertDrGlickert Member Posts: 1,135
    After RE-reading your post, it looks like my 2nd option is best for you.
  • fedifedi Member, PRO Posts: 31
    ok but when the player replay the lvl and beat the Highscore then the Highscore is added a second time to the grand total score.
    i think i have to add some timers at the end of the scene
    0,1 sec change attribute grand total score = grand total score - highscore (from scene)
    0,2 sec rule if score > Highscore change attribute Highscore to score
    0,3 sec change attribute grand total score = grand total score + highscore (from scene)

    what you think ?
  • DrGlickertDrGlickert Member Posts: 1,135
    You don't need Timers in there. In fact, they're probably making things worse (by eating up processing resources, i.e. it slows the game down unnecessarily).

    When you hit "replay level" or whatever you have, you'll need to put a few behaviors in there;
    1) RULE: When actor is touched AND mouse is inside Change Attribute game.scenescore to 0, Change scene to level 1(or whatever level the actor is in).

    This will reset the score for each time the player plays the level and it will be added correctly at the end.
Sign In or Register to comment.