File: “filename.txt”
-can be anything, name of the file you want to write in to, if the file does not exists, GDevelop going to create the file
Group: “Group name”
-can be anything, this is basically a name that you going to assign the value to. By using groups, you can store multiple values in the same file. For example the position of the player can be stored within a group and life of the player can be stored within an other group in the same file like so:
Group: “Player_position_X” to store the X position of player
Group: “Player_life” to store the life of the player
When you load the value from the file, you can use the group name to specify what value you want to read from the file.
X Position of the player or the life or anything else.
Expression: the value you want to save
-can be anything, a number such as 123331 or text such as “asdadada” or even a variable.
Object variable:
object_name.Variable(variable_name)
Scene variable:
Variable(variable_name)
Global_variable:
GlobalVariable(variable_name)
The main thing you need to keep in mind, Write Value can be used only to write number and Write Text can be used only to write text in to the file.
To Read value from file, basically the same thing:
File: Enter file name you want to read from
Group: enter group name that has the value you want to read
Scene Variable: enter variable you want to use to load the value in to, I think it needs to be a scene variable, and the variable also need to be added inside the variable editor, in case you want to store the value inside a global or object variable, just use the scene variable to pass the value over to a global or object variable after read but you can try to read the value straight in to a global variable or object variable, I don’t know for sure if it works with other than scene variable. Give it a try.
And again, keep in mind Read Value is to read numbers only and Read Text is to read text only.
I suggest to take a look at the “Level editor.gdg” example comes with GDevelop, it gives you a basic example how to make a save-load system using storage actions.
You can also checkout my example here:
gametemplates.itch.io/template-save-load
4ian did mentioned long ago, he may going to add save-load actions to make it easier, but finally it never been added to the road map but not much happening on the road map these days anyway.
I hope I’m wrong, but personally I don’t expect new features to come to GDevelop in the near future, devs seems too busy
In case anything is coming, according to GitHub seems like 4ian is playing with the idea of replacing the native engine (SFML) with something better but no announcements or anything, he has just mentioned in a topic he was looking at Cocos2D-X to be used with GDevelop “but looks more difficult to integrate”, so it may be nothing maybe his next plan, who knows.
His not sharing any of his future plans, ideas, thoughts and progress with the community these days