When you talk about an animated background, do you mean something in-engine? If so, It might be easier to switch to a separate camera that's off the scene somewhere in the distance, with all the background stuff in front of it, when the user brings up the pause menu. I don't have Unity with me now, but I believe it's possible to customise the pause action list, or I'm sure it's at least possible to define additional actions.
Another trick: use multiple Player prefabs, with one as your main player, and another as your "Pause menu player" (invisible). Have your Pause menu in a separate scene, but instead of using Engine: Change scene, use Player: Switch and switch to your "Pause menu Player" in that scene.
Then when you're ready to return to gameplay, you can just switch back to your original player, and the game will return you to the correct scene.
Hi Chris @ChrisIceBox, that did the trick! The only problem that is left is when I am in my Main menu (called Pause) and I go to Save or Load etc, the level goes back again to where I was instead of staying in the "Pause menu player". How can I solve this?
Another problem, I see just now, is that it doesnt remember the transforms when I go back to the scene. The player position is remembered, yes, but the rest isn't there anymore, like it goes back to the first state of the Remember Scripts of all objects.
Oh really? I thought it was how AC worked. I thought when I read about Switching players mid Game with the example of Day of the Tentacle it automatically not only stores the player inventory and position, but also the state of the objects in the scene. But the objects always go back to the first state (this works perfecly when saving though). I will post tommorow a screenshot since I am on mobile. But I can try now, in the Pause menu I run an ActionList when turned on which is: (Run in Background) Player : Switch New player: Pause_Menu_Player Restore position Checked If first time in game: New player position: Appear in other scene Choose scene by number 3 After running: continue
And when turned off, this ActionList:
Player switch New player: Wohian Restore position checked if first time in game: New player position: replace current player After running continue
DOTT-style scene saving/loading is certainly what should happen - like I said, the fact that they aren't is quite likely a bug. I shall look into this, thanks for bringing it to my attention.
So the state of the objects should be automatically saved when switching to another scene? At first I thought I needed to put a lot of bools in OnLoad but that would be strange because the game already saves and loads well. The Inventory and the player position are correctly saved though.
Hang on - are you saying that saving and loading for the room is not working when player-switching, or not at all?
When it comes to saving room objects, you still need to tell AC what to save - this is done by attaching "Remember" scripts to them. For example, to save the visibility of an object, you give it the "Remember Visibility" script. This is covered in section 9.2 of the manual.
Again, if what you're reporting is a bug, I'll fix it - but I just want to make sure that's clear if it wasn't before.
And obviously if I press Escape, the Load Menu element for example should go back to the MainMenu and when I press Escape again, the MainMenu should close and go back to the Scene that I showed on top, which is InGame. The First problem is that when I want to save a Game, it saves the Scene where I am in, which is the Pause_Menu_Player, it should save the InGame scene, and obviously not the Menu. But yes, it saves the Scene from the Pause_Menu_Player obviously, I am not sure if this is possible in AC yet, unless I use a sort of heck..
Comments
Then when you're ready to return to gameplay, you can just switch back to your original player, and the game will return you to the correct scene.
(Run in Background)
Player : Switch
New player: Pause_Menu_Player
Restore position Checked
If first time in game:
New player position: Appear in other scene
Choose scene by number 3
After running: continue
And when turned off, this ActionList:
Player switch
New player: Wohian
Restore position checked
if first time in game:
New player position: replace current player
After running continue
When it comes to saving room objects, you still need to tell AC what to save - this is done by attaching "Remember" scripts to them. For example, to save the visibility of an object, you give it the "Remember Visibility" script. This is covered in section 9.2 of the manual.
Again, if what you're reporting is a bug, I'll fix it - but I just want to make sure that's clear if it wasn't before.