So I am making a game with lots of levels. Each of these levels need to have a pause menu. So instead of appending and setting up the same scene (for each and every level), I started to experiment with LibLoad instead.
After loading (LibLoad) and clearing (LibFree) around 7 times, causes blender to crash.
Is this because I am not giving the program enough time to “free” or “load” the contents of the .blend?
Here is the script I am using:
import bge cont = bge.logic.getCurrentController() own = cont.owner path = bge.logic.expandPath("//demo_file.blend") load = cont.sensors['load'] clear = cont.sensors['clear'] if load.positive: bge.logic.LibLoad(path, 'Scene') if clear.positive: bge.logic.LibFree(path)
The python controller is connected to keyboard sensors with TAP selected.
Is there a better solution to add a pause menu? (it will most likely be an overlay).