Reset current conversation

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
munkbusiness
Posts: 10
Joined: Wed Jun 14, 2023 10:33 am

Reset current conversation

Post by munkbusiness »

Hi,

I have a problem where if a player exits the conversation early for example by going to settings and loading to the main menu. Then if the player starts the game again, the next time they encounter the dialogue system it continues from the previous spot.

How can I either register as if the conversation finished or reset as if it never happened through code?
User avatar
Tony Li
Posts: 22107
Joined: Thu Jul 18, 2013 1:27 pm

Re: Reset current conversation

Post by Tony Li »

Hi,

Are you using the save system? If so, does your Dialogue Manager have a ConversationStateSaver component? If so, then it sounds like you may want to remove that component.
munkbusiness
Posts: 10
Joined: Wed Jun 14, 2023 10:33 am

Re: Reset current conversation

Post by munkbusiness »

I don't have any object named ConversationStateSaver attached anywhere as far as I can see.
User avatar
Tony Li
Posts: 22107
Joined: Thu Jul 18, 2013 1:27 pm

Re: Reset current conversation

Post by Tony Li »

Hi,

Does your conversation have Conditions that, for example, check the value of a Dialogue System variable and link to different parts of the conversation? If so, you may need to reset those variables.

If that's not the case, can you send a reproduction project to tony (at) pixelcrushers.com?
munkbusiness
Posts: 10
Joined: Wed Jun 14, 2023 10:33 am

Re: Reset current conversation

Post by munkbusiness »

Just to be sure we are on the same page:

I have a save/loading system in my game. And I am using

Code: Select all

string s = PersistentDataManager.GetSaveData(); // Dialogue system data
saveData.dialogueSystemData = s;
and

Code: Select all

PersistentDataManager.ApplySaveData(saveData.dialogueSystemData);
for saving and loading the variables in dialogue database.

But I do NOT want to save the current progress in a given conversation.

If I exit in the middle of a conversation back to menu and go into another event that normally would load a new convo up, it tries to continues the current one.
User avatar
Tony Li
Posts: 22107
Joined: Thu Jul 18, 2013 1:27 pm

Re: Reset current conversation

Post by Tony Li »

In that case, I don't know what would be resuming the old conversation. Perhaps a custom script? If you set the Dialogue Manager's Debug Level to Info, it will log when a conversation starts. You can check the stack trace of this log entry to see what code is resuming the old conversation.
Post Reply