I would like to have/see file on hard drive in saves folder (of my video game)
what expressions should I use
give me an example
I have made it to load and save a file (see picture) but I don’t see it, I mean can’t manipulate it
You need to replace the FileSystem::ExecutableFolderPath()
with FileSystem::UserdataPath()
, and then any directories you’d like to save it to. This saves the data to the user’s save folder, but it also saves data on to your hard drive. You will find it in C:\Users\[YourUserNameHere]\AppData\Roaming\GDevelop 5
. Note this will save the files directly to the directory, and not in a dedicated save folder.
If you want to save it in a folder, add a delimiter after the directory I mentioned earlier, then the name of your folder, another delimiter, then the file name. For example:
FileSystem::UserdataPath() + FileSystem::PathDelimiter() + "saves" + FileSystem::PathDelimiter() + "savefile.json"
Sorry if this sounds confusing, reply if you need any more help!
OB
Also note: the \GDevelop 5
will only occur during previews.
Outside of Previous it’ll not have that part of the path for Userdatapath()