Game Highscore

Hi all,

I have a game and i want to save highscores,
I followed some of the tutorials, but it seems not to work.

I want my game to save my score or highscore when i reach a certain point (endpoint)

My score is triggered by how many times you move and this will be shown on your screen. It it doesn't save, thats how it is now and should be. But when you reach endpoint than it should save your highscore.

I probably misplaced something but i have no idea what.

Thanks in advance for the help.

Comments

  • Braydon_SFXBraydon_SFX Member, Sous Chef, Bowlboy Sidekick Posts: 9,273
    We can't help you if you don't share how your code is set up ;)
    If you followed the tutorials, you should be close. Post a picture of your rules and behaviors.
  • evertevert Member Posts: 266
    ok sorry about that!

    The first one is the code inside my bestscore actor.
    image

    Second one is the the actor that counts the score (i have two of these)
    image

    The last one is the one that should trigger the feature to save the highscore.
    This is my endpoint. If my actor does NOT reach this point it should not save (like it is now), but when he reaches it, it should save.

    In my image i have no game.score in my change attribute. But i have it here. Sorry about that.

    image

    Thanks again
  • -Timo--Timo- Member Posts: 2,313
    an how about the if game.score = 0? shouldnt that be > game.bestscore
  • evertevert Member Posts: 266
    yes indeed, thats the case, have no idea why it isn't at my screen
  • Braydon_SFXBraydon_SFX Member, Sous Chef, Bowlboy Sidekick Posts: 9,273
    yes indeed, thats the case, have no idea why it isn't at my screen
    So was that your issue? It seems like that would be the case.

  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949
    edited February 2014
    Post a new screenshot. There's a reason we often ask for screenshots and part of that reason is because we can immediately tell if you've selected an attribute from a menu or typed it in.

    The other thing you should do is start to add some Log Debugging Statements and then watch the Debugger window to see if those parts of your rules are triggering. For example, inside of the Timer in the bottom screenshot, add a statement that displayed game.score and one that displays game.Bestscore (be sure to select them from the attribute drop-down menu). When you do that, what do you see in the Debugger window?
  • evertevert Member Posts: 266
    edited February 2014
    Nop just tested it, din't work out. :(
  • evertevert Member Posts: 266
    edited February 2014
    image

    EDIT: I just did the debug window thing.
    it gave me two times: Log(Actor: GreatJob): 0
  • Braydon_SFXBraydon_SFX Member, Sous Chef, Bowlboy Sidekick Posts: 9,273
    Why is the Rule inside a Timer? You shouldn't need that...
  • evertevert Member Posts: 266
    omg! it was the timer all the time! how stupid.
    i did it because of 1 of the tuts on youtube did it so i tested it.

    But i deleted it now and it worked! :)

    thank you!
  • evertevert Member Posts: 266
    But now it saves as it should be.
    But actually not, because i want it to save when the the highscore is smaller than the previous highscore. Not when its greater :)

    The goal is to reach the endpoint in as little as possible moves.
  • Braydon_SFXBraydon_SFX Member, Sous Chef, Bowlboy Sidekick Posts: 9,273
    ...Right. Let me make a simple tutorial project. Back momentarily.
  • Braydon_SFXBraydon_SFX Member, Sous Chef, Bowlboy Sidekick Posts: 9,273
    Here it is. Check inside the Round Rules actor to see some little notes that briefly explain what's going on. Cheers.
  • evertevert Member Posts: 266
    thanks! I will try to figure this out, i will notify when it worked! :)
    thanks again for the great help
  • BonepileGamesBonepileGames Member Posts: 194
    I have noticed that if you manually write game.bestscore, it will not work, which is probably your case in the first screenshot posted. Try to choose it from the drop-down menu.
  • BonepileGamesBonepileGames Member Posts: 194
    Excuse me, tatiang already mentioned that.
  • evertevert Member Posts: 266
    @Braydon_SFX got stuck with the score system, send you a pm
  • evertevert Member Posts: 266
    edited March 2014
    'bump'

    as in this post my highscore problem is fixed.
    Now i would like my game to save the lowest score and not the highest when it reaches my end point.

    Braydon_SFX gave me a tutorial file (thanks for that one) but i was not able to find how it works and how to get it in my game.

    thanks

    @tatiang maybe you could give me some extra insight on this matter?



  • evertevert Member Posts: 266
    I think I almost got it..

    image

    I also changed the attribute value of bestscore to 1000.
    Now it works 2 times and than my bestscore/highscore changes to 0
    And i have no idea how and why.

    @tatiang @braydon_SFX
  • CodeMonsterCodeMonster ACT, AustraliaMember Posts: 1,078
    Hey feel free to check out mine and timolapres website at
    Gsinvention.com

    Go over to the free demos section and at the top you'll see a save top 10 high scores with tables.
    Download that and have a look :)
  • CodeMonsterCodeMonster ACT, AustraliaMember Posts: 1,078
    Although note that website will be down for around the next 10 minutes.
  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949
    Your rule says if score > bestscore then change score to bestscore. Pretty sure you want to change bestscore to score there. Also, you may want separate attributes for highest and lowest scores.
  • evertevert Member Posts: 266
    It seems that if i change it it counts my highest score again, but i want it to be my lowest score. :/
  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949
    Okay, I got confused because you initially talked about highscores and then you talked about low scores. For the best low score, you would do this:

    When game.score < game.bestscore
         change attribute game.bestscore to game.score

    You'd want to set game.bestscore to a high number such as 9999 as long as that's not a score you can ever start with.
Sign In or Register to comment.