Well initially I tried not to reload my images for every restart, but it didn't work.
After calling scene_cleanup() and then scene_setup() again, I receive this error message:
The line that creates this error is either this one:
AddSpriteAnimationFrame ( Integer_Sprite, LoadImage ( imagename + AddZero(x) + ".png" ) )
or this one (depending on how I structure the script):
So based on what you're saying I think this is what's happening:
When calling scene_cleanup(), all animations assigned to a sprite in the scene get deleted. So all my animations are not saved anymore.
So I have to load all sprites for every sprite animation again. However when I do that, I reload every image into the memory a second time.
While the animation sprites have been deleted, the loaded images themselves haven't. Which in return means that I simply have to use the method you described in my other post
about fast animation, when reloading my animations on restart.
I think I get that so far.
I think that's a terrible function of AppGameKit to delete all animation sprites when calling scene_cleanup(). It makes things so complicated! I have to reload every single animation again on every restart, or every time I return to the scene!
Imagine you create an adventure game where you constantly switch from one room to another, and can walk back and forth between scenes! There should be an option to cleanup the scene, without deleting sprite animations. E.g. simply:
scene_cleanup(1)//deletes all sprite animations
scene_cleanup(0)// sets all sprites invisible but keeps their animation sprites.