Attention | Topic was automatically imported from the old Question2Answer platform. | |
Asked By | MAJOR_KONTROL | |
Old Version | Published before Godot 3 was released. |
Hi. What to do when I want to load a save file with an object that has been deleted?
When I queue_free() an object, save code can’t find it in the tree and engine crashes
What is the correct approach to this problem? “Fake” deleting objects, to delete them permanently just before the next save game?
Here’s an example of my .json file:
{“/root/Game/Player2”:{“pos”:{“x”:195.674622, “y”:349.674164}},
“/root/Game/Player”:{“pos”:{“x”:850.269409, “y”:50.707882}}
Thank you.
I downloaded project files of freeware Tanks of Freedom. Dev seems to be saving everything about objects on the map and when loading the game, he erases entire level and builds a new one from the save file. Very interesting stuff for learning Godot out there.
MAJOR_KONTROL | 2017-12-11 18:57