Is there a way to make a running total score, while not allowing cheating?
I realise I can use a persistent variable to track a 'total score', but does does not prevent someone from going back to a previous level in the dream and replaying it to add more to that value.
The only solution I can see is to have 30 variables (one for each level) and then the 'total' is just the sum of those variables, but I think I might just not have a total score at all because that's too much work for little gain.
No problem, good luck with it! ^^
No problem. I actually shouldn't bother. You know better than I do. lol
Yup, the latter. Actually, two scores; one for score, one for time. So 60 variables in total :D
Since I am making a level editor, I instruct people to name them "Score_yourUserName_levelNumber" e.g. Score_xenareee_1 (and Time_xenareee_1). Then they must turn on a switch to confirm they have done this; if they don't turn the switch on, the level logic doesn't add the level score to the total (as there would be no way to remove the previous score from the total, breaking the total count).
The logic is only actually called at the point the score is 'saved' (i.e. level complete), at which point it 1) determines if the score is better than the saved one, then 2) modifies the total score/time values with the difference between the numbers and 3) updates the stored 'best' score/time values. So players can complete the level, then immediately rewind if they want to try again and it still works OK.
Thanks for your assistance with this, Xenareee and Zupaton
That’s an unavoidable thing. The more freedom you are willing to give people, the more you need to work for. :D
Zupaton, that would only work if levels are played in order, as you said. But also, it won't work if scores earned from levels can be different.
merkaba48, are all levels played in order? And what kind of scores you have? If it's just a "completed/not completed this level" kind of score and you play levels in order, there's an easier way of doing that, as Zupaton said :)
Though, if you need to have certain scores saved (like 2334 points in level 5) and change them while replaying, 30 persistent variables need to exist.
That sounds like it would work, if they are played in order and not repeated. That's not the case for me, though; I'm encouraging players to revisit their previously played levels and beat their last score, and I want to display that score in the level.
Actually this whole thing would be solved if only I could retrieve the player's best score from the scoreboard. But as it is, I've had to make a unique variable for every scene and keep track of the score that way.
It's also complicated a bit by the fact I have a level editor and want to encourage people to make their own levels. I've had to put in a bunch of guiding texts explaining that you have to give your level a unique name.
If MM updated Dreams to allow scene-specific - but persistent - variables, then this would be much easier. And / or, provide a way of retrieving scoreboard data in the scene. I will cross my fingers, though for now I have a solution :)
Call me idiot, for possibly not understanding what you seek but, what if you have one persistent variable for all scenes that checks against the correct scene number to add or reset the score?
1. You enter scene 1 and set the variable: Scene=1
The player solves the puzzle achieves a score you add it to the Score value and set Scene=2
2. You enter scene 2 and you check if the variable Scene is equal “2”
If it isn’t, you reset the Score, set Scene=2 and so on.
That seem valid as long as the scenes played in a serial order.
That's what I exactly said in my first comment: a variable needs to be persistent to be saved no matter where the player is in a whole dream. Sorry if it was unclear.
If you have non-persistable variables already, just tick "persist" in their properties! This should work ^^
If you're not sure if something is working, test everything with only one level and then, if it's working, make that mechanic in every level. Even if you don't have any score variables yet, you can save the whole mechanism in a microchip and place it in every level, just changing the individual score variable name. The less wires to connect to the microchip, the easier it is to set up :)
I tried this, but I made a mistake in thinking that a variable that doesn't persist in a dream will persist in the level, but that is not the case :( I will have to make 30 variables and update each level, then.
Nice idea with the scoreboard. Good luck then! ^^
Ah, subtracting the last saved score of the level at the start sounds like a good idea. I will try that, thank you!
The 30 variables is a bit of a pain as it means updating 30 levels and manually wiring each one to a different variable, but your other solution sounds much more appealing.
the context for this is a puzzle game of 30 levels; the total score doesn't really mean much, but I think most people will not complete level 30 and so in hindsight I think having a scoreboard for completionists is a nice thing to have.
To make individual scores changeable at any time, you'll need those 30 persisting-in-a-dream variables. Sorry. Either that, or just block the replaying. This depends on your dream and what you want to achieve, though.
But it can be done in two ways!
1. Having a big database of 30 variables in the hub or in any level you need to display the total. If you don't need to show the total in individual levels, you can place just one variable that belongs to each level.
2. Having a persist-in-a-dream variable in each level for that exact level, but... they don't go anywhere else! They persist to not reset after replaying an exact scene/level. To this, having a total score variable everywhere. When replaying, it resets the score for that level and substracts it from the total. After completing, it adds a new one to the total again. This may be different, but doesn't require you to paste a 30-variable database anywhere.
(And little tip: in variable modifier, you can choose a variable with ^ and v dpad keys instead of typing each variable name separately.)
Making those variables shouldn't take much time: don't give up! I hope you can make this :)
Also, sorry for the long comment.