Good afternoon, everybody!
So, I made my menus able to save-mid conversation, but it doesn't automatically start the loaded game with the conversation running at the last entry read. Should I ask how to find out which conversation is active, and the ID of the currently running entry via script, or is there a more direct way to achieve the same results?
Besides Dialogue System for Unity v 2.2.7, I'm also using Adventure Creator v. 1.71.7, if that's important.
[Solved!] Loading a Game at the last Dialogue Entry Read
-
- Posts: 111
- Joined: Thu Sep 27, 2018 11:06 pm
[Solved!] Loading a Game at the last Dialogue Entry Read
Last edited by CodePrincess on Wed Sep 16, 2020 8:36 pm, edited 2 times in total.
Thank you so much for your help.
Oh! My stats!
Unity 2020.1.10f1
Adventure Creator 1.72.2
Dialogue System for Unity 2.2.12
Oh! My stats!
Unity 2020.1.10f1
Adventure Creator 1.72.2
Dialogue System for Unity 2.2.12
Re: Loading a Game at the last Dialogue Entry Read
Hi,
What if you add a ConversationStateSaver component to the Dialogue Manager? I haven't actually tested this with AC, but I think it should work depending on how you're setting up saved games.
What if you add a ConversationStateSaver component to the Dialogue Manager? I haven't actually tested this with AC, but I think it should work depending on how you're setting up saved games.
-
- Posts: 111
- Joined: Thu Sep 27, 2018 11:06 pm
Re: Loading a Game at the last Dialogue Entry Read
It... looks like I have added one already. Why Didn't it...What if you add a ConversationStateSaver component to the Dialogue Manager?
Oh! Okay, I just needed to run the load action list through a script with one of those OnFinishLoading() methods.
Oh. Oh, no. Big stack overflow. Wait, why would my load script-
Code: Select all
public void LoadTheGame()
{
Debug.Log("DialogueProgressManager.LoadTheGame(): Attempting game load.");
int slot = AC.GlobalVariables.GetIntegerValue(slotindex); // 8 = AC var "save Slot Index"
PersistentDataManager.LevelWillBeUnloaded();
var saveSystem = FindObjectOfType<SaveSystem>();
if (saveSystem != )
{
if(SaveSystem.DoesSaveExist(slot) == true)
{
SaveSystem.LoadGame(slot);
Debug.Log("DialogueProgressManager.LoadTheGame(): Game loaded.");
}
else { DialogueManager.ShowAlert("Save a game first."); }
}
}
Thank you so much for your help.
Oh! My stats!
Unity 2020.1.10f1
Adventure Creator 1.72.2
Dialogue System for Unity 2.2.12
Oh! My stats!
Unity 2020.1.10f1
Adventure Creator 1.72.2
Dialogue System for Unity 2.2.12
Re: Loading a Game at the last Dialogue Entry Read
If I understand you correctly, when it finishes loading it calls LoadTheGame(). But LoadTheGame() calls SaveSystem.LoadGame(), which starts the load process again, creating an infinite loop.
Have you added a Remember Dialogue System component to your Dialogue Manager?
Try these components on the Dialogue Manager:
Have you added a Remember Dialogue System component to your Dialogue Manager?
Try these components on the Dialogue Manager:
- Dialogue System Controller, Input Device Manager (the usual)
- Save System, Json Data Serializer, PlayerPrefs Saved Game Data Storer, Dialogue System Saver, Conversation State Saver
- Adventure Creator Bridge, Remember Dialogue System
-
- Posts: 111
- Joined: Thu Sep 27, 2018 11:06 pm
Re: Loading a Game at the last Dialogue Entry Read
... Okay, and check Remember Dialogue System's "Retain in prefab?" check box and ...it works!
Whoo! Thanks again, Mr. Li!
Whoo! Thanks again, Mr. Li!
Thank you so much for your help.
Oh! My stats!
Unity 2020.1.10f1
Adventure Creator 1.72.2
Dialogue System for Unity 2.2.12
Oh! My stats!
Unity 2020.1.10f1
Adventure Creator 1.72.2
Dialogue System for Unity 2.2.12
Re: [Solved!] Loading a Game at the last Dialogue Entry Read
Happy to help!