(GAMEJAM) Resume specific scene

Let’s say that I go from scene 1 to scene 2 and then to scene 3, I want to resume back to scene 1 and not to scene 2

Is there a way to do it, or at least simulate that?
I need the player to move inbetween several scenes without them reseting back to original state

1 Like

You must go to scene 2 first.
How about you store the scene you’re currently at and then follow it back at the beginning of the scene?
You could also just use the same scene but by moving cameras.

I can’t use room-based camera because I need to change inbetween scenes (and bc I already use it BUT I need to pause every object’s state)

I can’t go thru each single scene since the thing us like Pizza Tower’s where you touch an hallway object which puts you onto a specific, set in the hallway object, scene and a specific place also set there

What I have rn is a scene that’s a normal level, in it is a hole with a hallway object that puts you in another scene that’s a tutorial, after tutorial you don’t start at the same place as before, but instead somewhere else so I need it to loop properly

So scene1 is the hallway, scenen2 is the tutorial and scene3 is the actual next scene?

Then why not go from scene1 to scene3, and at the beginning of scene3 open scene2?
Then from scene2 you return to scene3, and from scene3 you can return to scene1.

1 Like

Here’s the entire thing

also here’s the link to the exported thing if you want to see how it works without recreating
(The link might disable any time though since it’s the default gdev export link)

Figured it out (somewhat)

I just make it make a savestate for each single room and then load that state at the beginning of the scene

The scene practically still resets, but what’s broken stays broken

…problem, it persists when I close the game and reopen it which I don’t want to happen and there’s no way to delete a saved file from what I can tell

1 Like

Try deleting the storage of the game name. I’ve never used the save state extension, but I did see that on the forum. You could also overwrite it in you’re home menu.

I gave up on that, whatever I’d do it does not do what it is supposed to do

You don’t need to save the entire scene for this. If you need to control the state of an object that needs to be maintained throughout the game, for example, use a global variable to control this and check this variable at the beginning of the room’s event sheet, determining the object’s status according to the variable’s value.

1 Like

I already do that for one thing
It works when there’s only one object of it’s kind on the scene, not if there’s a ton

If you need to do the same thing for multiple objects at the same time, you can group them and perform the same validation using the group as a single object.

Using state control variables to manage objects outside of a scene is the simplest way to handle this problem. I can’t visualize why this wouldn’t work based on what you’ve shown us so far in the examples.

If you’d like to share a part of your project here on the forum, it might become clearer exactly what you intend to achieve, and we can help you better.

You can see it by just destroying the blocks at the start, getting into the hole, finishing the tutorial and just going back to the beginning
Best example of what I want is Pizza Tower, every room is a different scene and going from one room to another keeps all the previous states in-tack, stuff that’s dead/broken stays dead/broken

And I can’t use global variables, especially as “single object”
Storing every block’s variable as global would at some point tank the game because of the +100 things that would need to be stored (collectables, enemies, breakables, other junk) and doing it as single one would just… delete all of them

I don’t think you have many options, unfortunately. If you have 100 different objects that need to have their states controlled independently, each of those objects needs its own control variable. You could create that variable within the object itself, by the way, and use it for that purpose.

Creating a specific functionality in the engine to save the current state of a scene wouldn’t be much different from that.

Well, if you didn’t know, just bc of this I didn’t manage to hop onto the 9th gamejam, sucks but it is what it is

1 Like

Sorry you weren’t able to solve this in time. I may consider creating an extension implementation of this.

It would help in practically every project I had to put on a backburner (all of them had simmilar issues actually)

1 Like

Okay. I did try extending the capabilities a little to support: Deletion, Duplication and Checking.
https://files.catbox.moe/sxcri3.json
You can save the json and try it in a demo project.