GML how to store multiple kinds of instances with their x and y coordinate



basically what I'm trying to do is make it so that when the player presses Z, each instance of every object parented to a parent object is stored but is no longer in the room and a new setup is drawn, and when the player presses Q, the new setup is stored and the old one is shown and i need to be able to do this for multiple setups. I know this is probably asking a lot but does anyone know how to do this?

I already have it able to draw the setup randomly btw.


You want it stored forever, or just while the program is running?
If 1) Maybe look at saving to an ini
Else if 2) you could make a global ds_grid, containing instance and position.

If you go the .ini route, you could have a different section per room, that'd make it clearer to read and edit.