More Mountains Inventory persistance across scenes

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
Trashrat
Posts: 25
Joined: Fri Oct 13, 2023 11:38 am

More Mountains Inventory persistance across scenes

Post 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
Attachments
Capture1.JPG
Capture1.JPG (68.44 KiB) Viewed 189 times
Capture.JPG
Capture.JPG (65.07 KiB) Viewed 189 times
User avatar
Tony Li
Posts: 22110
Joined: Thu Jul 18, 2013 1:27 pm

Re: More Mountains Inventory persistance across scenes

Post 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.
Post Reply