Skip to main content

Search

Is there possible to save the best time or score?

  • OgTheEnigma

    This is achievable with variables, although it will only compare the user's best time (not other players) and they will lose the data if they reset progress for the Dream.

    To set it up, you could take the output of whatever you're using for the time/score and connect into the 'A' input for a < Calculator. Connect the output of a 'Persist in Dream' Variable into the 'B' input for the same calculator. Maybe call the Variable 'best time'. What Calculator will do, is produce a signal when the current time is less than the best time. If you need a higher score to be better, then use a > Calculator instead.

    Next, connect your current time/score output into the Operation Value for a Variable Modifier (this is the same time/score input which connects to calc 'A'). Make the Variable Modifier reference the 'best time' Variable. The Variable Modifier should also be configured to 'Set' and 'When Powered On'. Now take an AND gate and connect it to the power port for the Variable Modifier. Take a wire from the calculator 'Result' output and connect it to the AND gate.

    Finally, you probably already have some logic to indicate when the level is finished, for example when you're sending a signal to a Score Gadget to post to the Scoreboard. Ideally, this should be a pulse. Just take the output of this logic and connect it to the other port for the AND gate.

    Hopefully this will work. This is the general concept of how I got a score saving system working for a Dream I made previously. Although, with logic it's easier for me to test while playing, so I can't guarantee I haven't missed out anything in the text here!

  • Rabagast

    Hi!

    Thank you! I will try it out later tonight or tomorrow. ?

  • Supposer

    If all you're trying to do is store the best time, then the scoring system does all that for you. And if you beat your previous score, the player gets a little notification letting them know ;D

  • Rabagast

    Hi, Supposer!

    I know I can post the score or time in the global score board, but I want to save the best time in each level, so when I play a level, there will be your current time and also the best time for that level.

    I haven't tried the suggestion to "OgTheEnigma" yet to see if that works. ?

Please sign in to leave a comment.