i have the score and highscore set , but i cant get the highscore to save once the character dies or if the application is closed , heres a screenshot of what i got so far im confused as hell and been at it for 8 hours haha
If I had an events sheet like this, I’d have been confused too. Why are there so many highscores? Or are they the same object?
GDevelop is case sensitive. And it’s a good practice if you name an object rather than using the default names.
Just fix the highscore objects, they’re too confusing and then someone might be able to help you out
its because i made a text and put highscore so i used that for the score to go onto but then someone said to use a global variable , so i put that as high score assuming it would make a text for the score to go up etc… but it didnt lol so know i got the text highscore which the score goes up on and also a global highscore.
i set that if the score is higher than the global variable high score then to set the highscore to the same as score. but it has no text ? so i still have to use the high score text i made or how can it go up if nothing is there ? im confused just writing this hahah
and the save i cant figure out lol , do i make it write it and then read to load it again ?
i didnt know it could be so difficult to just save a high score hahaha ive been at this for hours and nothing works.
I’ll be honest with you, I still don’t get it. Is it possible for you to use a simpler nomenclature? Or maybe someone might be able to help you based on the above screenshot too, you never know.
i will try rename and simplify abit now
Hi there,
I see you are storing the data, but make sure you are loading the stored data from the storage(the place where you saved) at the beginning of the scene. If you don’t load the score, then how will the variable get the saved highscore
im stuck here and dont know where to go from here
score and highscoretext are both text objects that i made
the other is scene variable score and global high score
to store the date im confused on what i need to do ?
do i write the global score or the highscore text i made
and then which one do i load lol
Also, you said about the character dying.
But you are saving the data ONLY when the ball and catch are in collision. So, if that’s the case of the character’s death then it should work. But if that’s not the case, then I don’t see any event to save the data if that collision doesn’t occur.
You are using sub-events for the conditions and actions under the collisions event. All those sub-events will only be executed if the collision occurs or else, it won’t execute or check the sub-events at all.
Similar to the way you wrote the data to an external file, there should be another option to load the stored data.
You should load the highscore the beginning of the scene, from that file.
ball and the catch is what makes the character get points once the ball hits the catch he gets 10 points thats why i choose for the data to be saved there not sure if its the right thing to do but, the only thing i want to save is the highscore , as i dont have levels its just a highscore game on one scene and 2 scene for the try again and opening page for the game
so if i write the data it saved it and if i choose the read the data it loads it am i correct ?
Yea that’s what I thought. Since you are saving the data as sub-events, the data only saves when the player catches the ball.
Try making the data-save sub-events normal events rather than making them sub-events
thats what i got so far i got the timer to write the files for them two and then i added to the when the scene starts part to read the files, and that didnt work so i got it to load the value and that didnt work. im completely lost on how to save a score and load it surely it cant be this hard lol
Is your global variable Highscore the one that is supposed to store the value of the high score? And make sure to read “data”.
-
Remove the bottom event that has variable “highscore” in it because it might cause a confusion.
-
Rather than storing variable score to highscoretext, set highscoretext equal to the variable score in the event where you compare score with global variable highscore
-
Make sure to reset the timer in the action for the condition of checking timer value
heres what i have so far and sorry for being a pain but ive only been using this for a day and half and the rest of stuff im getting the hang off but cant work this one out , and thank you so much for taking your time to help
i was wanting the highscore to save to the global variable yes but i think its saving to the highscore text im not sure, ive been doing it for that many hours ive confused my self lol
Most of it looks fine to me except that you’re directly assigning a variable to a text. As I said before, you can store it in a variable instead of a text and in another event you can add an action without condition that’d put the variable’s value in the text.
Add an event to read the value from the stored data and make sure to use the same storage name and group as the read action. Store the value in a scene variable.
Edit: Just a doubt, what’s with the object catch?
its just a game where the ball drops from the sky while moving side to side auto and you press a button to make the ball drop and you have to catch it in the catch if it missed its game over and start over again but every time you catch it you get 10 points hence the needing high score lol
Why is there an object named “catch”?
Also, I hope you’ve seen the Platformer game tutorial
I’m sure many of your doubts would be solved if you go go through the tutorial thoroughly.