Hi all,
I’m having trouble implementing my “logic” of how to do this:
When you start to play, you have a layout, but nothing in it, and you can populate the layout with different things (Actors), rotate them, move them and you can also delete them. You can “Save” at any point, and “Load” at any point. When you save, it would compare every object (that can o should be monitored to be saved) to the array variable (maybe a Struct array with Actor, Class and Transform). Then it would update that array, removing the Deleted actors, updating transform data from other actors (if applicable), and after updating the array, saving the slot. once you load, it can do the same thing, or (and I think this is better for resources, correct me if I’m wrong, please) it would just get a clean slate, and spawn everything as it is on the Save Slot Array Variable.
So:
Save → Call all actors from (tag, Instance, Class, etc) → Compare with array variable → update array (changes, or differences) → Save Slot with Updated Variable
Load → Clear level → Call Variable from Save Slot → Spawn actos from Variable → Update Array Variable
Please! if anyone can help me with this, I’ve beet at it for way too long, and I can’t figure out a way of doing it… I’ve only gotten as far as saving the Struct (with Actor, Class and Transform) of each actor in a Struct Array the moment you spawn them, and then when click on Save, it copies that variable with the info into the Instance, and on load it calls that variable from the instance, copies it into the one updated when spawning actors, and spawning every actor in it… When I tried removing from the array, every “click” it only removes Half of the array (so if I have an array with eight, I press Load and Removes 4, then 2, then 1, then all of them. that if they where deleted in the first place, its just weird) And when I save, I’m not comparing anything with the array, so I can still spawn everything multiple times one on top of the other…
I literally need what I described above, I feel the logic is pretty optimized for not consuming a lot of resources, I just don’t have the experience and/or knowledge yet to implement it on my own.
Any help is greatly appreciated!!
Thank you in Advance
Best Regards!