Make sure your PersistentEngine prefab has a
Dialogue System Saver component with these values:
- Set: Manual
- Retain in prefab? ticked
- ID: Some unique value such as 99999
The Dialogue System Saver component hooks the Dialogue System into AC's save system. When AC saves a game, AC will tell Dialogue System Saver to save the DS state (DS variables, SimStatus, etc.) to an AC global variable.
Here are two ways to verify that it's working:
1. In AC, create a global string variable named "DialogueSystemEnvironment". After saving, use the AC Game Editor to check the value of this variable.
2. On the Dialogue Manager, change Debug Level to Info. When saving a game, you should see messages like:
"Saving Dialogue System state to Adventure Creator."
and when loading a game, you should see:
"Restoring Dialogue System state from Adventure Creator."
Kole90 wrote: ↑Mon Dec 11, 2017 3:59 am
Also I found somewhere on the forum that you recommended this line of code to change AC variables through DS Script fields [SetBool] but it doesn't seem to work for me, keeps throwing an error...
There was probably some other context in that forum post for SetBool(). It isn't a built-in function. This is how variable synchronization works:
On the Dialogue System's Adventure Creator Bridge component:
- If "To Dialogue System (On Conversation Start) > Copy AC Variables to Dialogue System" is ticked, then when a conversation starts it will copy all AC variable values into the Dialogue System.
- During the conversation, you can change DS variable values.
- If "Back To AC (On Conversation End) > Copy Dialogue System to AC Variables" is ticked, then when a conversation ends it will set all AC variable values to the current values of the corresponding DS variables.