Return to previous level in same location

Hi
I have created a mini game within my main game. I would like to move to the minigame and when complete return to the previous level in the same location and state.
What is the best method for doing this?
Thanks

Hey there @Malcav1an! This question has many answered depending on your game and how your minigames are handled.

One method would be to keep the main level loaded, and stream in the minigame itself somewhere else within the same map- and just possess the minigame pawns until done then swap back to the overworld when done. This works well and doesn’t require much besides making sure you can effectively halt action on the overworld. The main drawback would be performance hit of keeping the overworld loaded, but is more recommended in my opinion.

An alternate method if it’s something like Mario Party where your minigames are an entirely different level (in this case an entirely different map), you would have to reload the positions and state of everything in the level coming back to it. This could be done by saving the important variables and spawning everything back where they should be when you return. This can be clunky for short term changes, and are more often useful for player saves.

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.