How to pause several scenes?

What I mean:-
1- You have scene 1 , 2 and 3
2- How to make it so that you can go back and forth between each one of them and keep everything the same as it is.
I know about the "Pause the scene and start " Whatever scene " " event and also the " stop and go back to the previous scene " event.
But I can only make it work for 1 scene … I can’t make it so that you can go back and forth …
Here is an example I made with (draggable objects) …
Download the rar file here (have the project file inside):
If someone can make it happen so that you can go between scene 1 , 2 and 3 back and forth … that would help me a lot.

1 Like

I believe it is done by purpose to be able to pause only 1 scene at the time if you pause an other one, it is override the previous. It is because 4ian was worried people may pause and store too many scenes in memory and then complain about GD uses too much RAM.

The only solution I know is to save the state of each scene in storage and then load it at the beginning of the scene…

1 Like

Uhm, there is no such limit from what I remember. The scenes are in an array and when “pausing” a scene, you just put another scene in the array, and the last of the array is always the current can the stop background scenes (clear the array and leave only the current scene), or go back to a previous scene (removing the last/current scene from the array making the one from before the new last scene in the array) etc. There should be nothing like a limit in that system.

1 Like

I remember 4ian talked about keeping only 1 scene in memory to avoid people fill up memory with paused scenes, but I never really used it to be honest he may changed it since then.
So how could you actually go from level 3 back to level 1 if you paused level 2 before? Or from level 2 to level 1 if you paused level 3 before? I believe you can go back only to the previously paused scene or not?

1 Like

That’s exactly what I’m looking for … How @arthuro555? If you can show us in an example would be great too.

1 Like

I was looking for an answer to this very question and was about to post a topic when I found this thread by searching.

If this topic is too old to reply to accept my apologies and move it if necessary.

After some thinking, I think I have come up with a solution.

What I did was make all of my scene names numbers. Like my first scene is scene 0, then 1, 2, etc.

Now, when you want to change scenes, you not use return to a previously paused scene. Use only change scene, and use ToString(GlobalVariable(scene)) as the designated scene to change to. You just have to devise a system to control what value is loaded into GlobalVariable(scene)

@fitkoh Thanks a lot for this … could you just make a small example showing this in engine? because it’s not really working with me here … Need to see it separately so I can implemented in my game.
This will honestly help a lot if you can make a small example …

I can’t find an expression to retrieve the save data but this is a workaround that mimics the effect.

play online


1 Like