Page 1 of 1

More Mountains Inventory persistance across scenes

Posted: Sun Apr 14, 2024 1:34 pm
by Trashrat
Hi Tony,

Unfortunately i'm having difficulty keeping the inventory the same across different scenes and I think it might have something to do with how I am loading my leves. Currently this is through sequences on dialogue choices like this:

Code: Select all

SetContinueMode(false);
Fade(out)->Message(Done);
SetContinueMode(true)@Message(Done);
LoadLevel(CroftExteriorNight)@Message(Done);
Continue()@Message(Done)
Any help would be greatly appreciated, thank you

Re: More Mountains Inventory persistance across scenes

Posted: Sun Apr 14, 2024 6:58 pm
by Tony Li
Hi,

There are two ways:

1. Use More Mountains' scene changing and persistence system. (See How To: Use Corgi / TopDown Engine MMSceneLoadingManager.)

2. Or set it up the way you've done, which uses the Dialogue System's scene changing and save system. Make sure you've set up a Save System component. A quick way to do it is to follow these steps. If the Save System component is already set up, check the Console window for any errors or warnings when changing scenes. Also make sure the MainInventory GameObjects in both scenes (old and new) have Inventory Engine Saver components set to the same Key value.