Save multiple variables in a single .json file

I’m making a level creator, and the main problem I’m having is saving the levels. The system I have works well, but whenever I save a level, instead of creating a new file with the new values (X/Y position, Angle…), it replaces the previous values. I tried saving the values ​​in json files, but apparently it can only save one value per file. Would there be any way to resolve this?

(I set it to create 2 json files temporarily precisely because with just 1 it wasn’t working, which would be ideal)

You can put everything into 1 structure /array variable and save it once. This is for storage. I don’t know how to the the file part but I’m assuming it would be similar.

1 Like