Save and Load Added Objects with cPickle

This will reload added objects exactly how they were before, when you quite the game and restart it.

There were a couple of people on the forum asking for something like this, and Shobit even sent me a PM. So I made this simple little example. I hope you enjoy it.
Learning about cPickle and dictionaries with python is recommended. :slight_smile:
With a lot more work, this could probably be used for level creation.

-Space adds cubes
-Left click deletes the cubes
-Esc saves the objects position, orientation, and velocities. And they are reloaded when the game starts again.

Attachments

saveLoad added objects with cPickle.blend (145 KB)

Waow! This works just the way I want. Thanks a lot for the demo. I will study it now. I was trying to achieve this since a long time. But I’m new to python scripting in Blender so it was sort of impossible for me!

Thank you again!

Nice one!
Thank you for sharing!
Bye