Save the state of the game

Hello!

  1. Are there any ways to save the whole state of the game without using many storages for each variable or position?

  2. How can I use one event for a group of objects instead of this?

events

#1 has a lot of posts and would depend on what your game looks like. Most (if not all) involve putting all the information into an array and/or structure, convert to a json string and save it to storage. Then load the string, convert from JSON to a variable(s) and create or position the objects and their settings using for each object and/or for each child. This is simplistic but is the general concept. Search the forum.

#2 You can use the sticker behavior on _1 thru _4 and stick them to the other object. Once stuck, they would follow the object they’re stuck to.

or

put _1 thru _4 into a group, for this I used a group named “Group”

Set position of Group to  tomDialog1.PointX(Group.ObjectName()), tomDialog1.PointY(Group.ObjectName())

#1 - I meant something like one event to save everything in the game.
#2 - Thank u, works nice.

1 Like

No, there’s no simple way unless you can create or find an extension. I wish it was easier.

1 Like