I’m confused as to how you save the game in g develop. Like how would you make it to where when you click new game it puts it to the first level and when you click continue it does just that obviously? I’ve seen some tutorials but they don’t really explain what anything does honestly…
It is normally using the storage events. You can find a detailed explanation here:
And you can find some examples included with GDevelop too.
Is there any specific part of the storage events that you don’t understand?
I’m not completely understanding “groups” at the moment but I’m trying to read into everything and figure out how it works.
Based on my understanding,
Let’s say School as Storage, and classrooms as Group. And you want to find a student where student is the one you stored.
I want to find a student in School in what classroom.
I want to find my saved in Storage in what group.
Storage can have a multiple group to classify.
I’m afraid I can provide only the same explanation as on the wiki. You can think of the group as a label to flag the value in the storage. So if you want to store the player money, you can name the group for example “playerMoney” and so later when you load the game and you want to load how much money the player have from last time played the game, you can looking for the group “playerMoney” and read the actual value from the “playerMoney” group.
I think the name “group” is misleading because you can’t really store multiple values in a group, but only 1 value. So the best way to think about it I think as a label or container maybe for the value so you can find it by name when you read the value from the storage.
Okay this explanation as well nmrisrl11’s explanation are pretty easy to understand, thank you.
Also is the “Read a value” option for like loading something and the “Write a value” for saving or do I got something wrong?
Yes, read value is to “load” a number value from storage and write value is to “save” a number value in to storage. This is for number value only.
For text value you need to use Read text and Write text.
Okay and something I’ve noticed that is weird. How come I can’t use global variables in “Read value”?
Edit: This is what I read on g develop’s explanation about using global variables in reading a value, it says “In case, you want to store the value inside a global or object variable, you can use the scene variable to pass the value over to a global or object variable after reading from the storage.” What does this mean and how do I go about using a global variable in the “Read a value” option in G develop?
Don’t know why is it limited to scene variable only.
If you want to read something in to a global or object variable, you need to read it in to a scene variable first and then pass the value from the scene to global or object.
So let say you have a scene variable called “sceneVal” and you have a global variable called “globalVal”.
You read the value in to “sceneVal” and then to pass the value to the global variable you need to use the event to set value of global variable like so:
Do = Variable(sceneVal) to the value of global variable globalVal
Variable(sceneVal) is an expression that you need to use in the value field of the event to point to the scene variable.