Can someone please help me it’s about when I complete level 1 I unlock level 2 so the problem is that I never get it saved as soon as I leave the game I have to start again from level 1 youtube videos didn’t help either or anything
I think (I’m not sure) that u can save a variable to the device, and retrieve it later, using an action, though I’m not experienced in this matter
You need to save the highest level unlocked into storage when level has been completed.
At the start of the level selection scene, read in the highest level from storage, and lock only those levels greater than the highest level unlocked.
Thank you for your answer. But somehow I can’t get it, can you create one and send me a screen please ? would be very grateful and sorry for my english I use google translator
There is already an example for this in the engine. In the main example list (within the “build” section when you launch the engine), search for Level Selection unlock".
Thank you for your answer. But its Not Working
That doesn’t help. What doesn’t work - saving or reading? Look through your events, and figure out what it’s supposed to do, and work out if it actually does it.
If you include a screen shot of your events, then we can help point out where the problem lies.
i don’t know where the problem is i’ve been trying for weeks sometimes it’s open up to level 3 and sometimes level 2 doesn’t open at all here are a few screenshots you can’t see the pictures properly i’ve edited everything up to level 22
I’m very disappointed that example is in GDevelop. It’s a very poor example of how to implement a level unlock mechanism, and certainly not one I would ever recommend doing. I would do it this way, which is a hugely more scalable:
The objects used:
This produces the following, with a max level unlocked = 13:
I have now done everything as you did my problem is now only 1 box spawns for me and no level starts and the number is floating at the top left I think otherwise the method will work
Still having problems?
What do you mean with “how do I start level 1”?
What’s the problem?
You click the button and it doesn’t work?
The game suddenly stops?
It starts in another level?
You made some changes in your game, obviously you’ve to adjust other things, specially variables
Did you already check everything?
Nobody here will be able to magically guess what’s happening in your events, we need more information.
When you complete the level, use this action instead of what yo have: