Ink VariablesState reset on load.

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
libdudeak
Posts: 1
Joined: Sat Jun 06, 2020 10:33 am

Ink VariablesState reset on load.

Post by libdudeak »

Hi,

I'm using the Dialogue System with the Ink Integration. I've been able to get it to save and reload at the correct place in teh story but for some reason it loads with the default variablesState rather than one that reflects the previous events of the saved story. For example, a variable that starts at 2 in a new game but was 4 in the saved game would be back at 2 upon load.

I'm calling SaveSystem.SaveGameToSlot and SaveSystem.LoadGameFromSlot on the Dialogue Manager (Save System). Is there a setting I'm missing? Should I be calling the Ink Saver directly?

Sorry if I'm missing something obvious and well-documented.
User avatar
Tony Li
Posts: 22143
Joined: Thu Jul 18, 2013 1:27 pm

Re: Ink VariablesState reset on load.

Post by Tony Li »

Hi,

The Ink Saver component will save the current Ink story state, including Ink variable values. Make sure the Ink Saver has a unique Key value.

To save Dialogue System variables, add a Dialogue System Saver to the Dialogue Manager GameObject. Make sure it also has a unique Key value.
Post Reply