0 votes

I am trying to make a building game and i need to save tiles positions and load them from a file , they are from a tilemap
any ideas what i can do?

Godot version 3.2.2
in Engine by (16 points)

1 Answer

–2 votes

You could use a File, save with save_file.store_line(JSON.print(...)), load with JSONParseResult().

Alternatively, you can save you values using a Resource. Create a script extending Resource, with exported variables to store your data. You then call ResourceSaver.save() to save it to disk, and load() to read it back.

You probably want to store your files inside the special user:// folder.

by (2,442 points)
Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to webmaster@godotengine.org with your username.