Need Help for 2 Questions Please

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
kuzgun
Posts: 5
Joined: Mon May 27, 2019 8:47 pm

Need Help for 2 Questions Please

Post by kuzgun »

Hello,

1)To configure Quest Tracker: I did add an instance of Basic Standard Quest Tracker HUD to the Dialogue Manager's Canvas. Then inspect the Dialogue Manager's Instantiate Prefabs component and remove Basic Standard Quest Tracker HUD from its Prefabs list.

But now it is not updating tracker entries or not showing values of variables as they are updated from conversation, it only writes Quest name or showing Quest Description. I added UpdateTracker() sequence to the dialogues, It was woriking fine with standard prefab version.

How can i make it show quest variable entries in real time, while playing?

2) I added saivng system and auto save scripts to dialogue maanger. Also found and added RememberCurrentDialogEntry script to dialogue manager.

Now it saves the game and last conversation without problem.

Than i added a reset button on canvas with functions of:

DialogueManager.ResetDatabase(DatabaseResetOptions.RevertToDefault);
Scene scene = SceneManager.GetActiveScene(); SceneManager.LoadScene(scene.name);

My problem is: It resets the scene and reloads the main scene (not DontDestroyOnLoad scene), and quest entries are reset as i wanted.

However: dialogues remains the same at the last spoken phase. It is not going back to the first dialogue and restarting conversation unless i exit from runtime and rerun the game.

Is there a way to restart the dialogues with reset button from the begining without exiting the game or runtime?

Thank you very much.
User avatar
Tony Li
Posts: 22143
Joined: Thu Jul 18, 2013 1:27 pm

Re: Need Help for 2 Questions Please

Post by Tony Li »

kuzgun wrote: Wed May 29, 2019 2:08 pm1)To configure Quest Tracker: I did add an instance of Basic Standard Quest Tracker HUD to the Dialogue Manager's Canvas. Then inspect the Dialogue Manager's Instantiate Prefabs component and remove Basic Standard Quest Tracker HUD from its Prefabs list.

But now it is not updating tracker entries or not showing values of variables as they are updated from conversation, it only writes Quest name or showing Quest Description. I added UpdateTracker() sequence to the dialogues, It was woriking fine with standard prefab version.
I don't understand. Does it show the text "Quest Name" or does it show the quest's actual name but it doesn't update variable values?

Are there any errors or warnings in the Console window?

If you use SetQuestState() or SetQuestEntryState() in a dialogue entry node's Script field, you don't have to call UpdateTracker(). These functions will automatically update the tracker.

If you change variable values that your quest entry test uses (such as the variable "ratsKilled" in "[var=ratsKilled] / 5 Rats Killed") then you will need to add UpdateTracker() to the Script field.

kuzgun wrote: Wed May 29, 2019 2:08 pm2) I added saivng system and auto save scripts to dialogue maanger. Also found and added RememberCurrentDialogEntry script to dialogue manager.

Now it saves the game and last conversation without problem.

Than i added a reset button on canvas with functions of:

DialogueManager.ResetDatabase(DatabaseResetOptions.RevertToDefault);
Scene scene = SceneManager.GetActiveScene(); SceneManager.LoadScene(scene.name);

My problem is: It resets the scene and reloads the main scene (not DontDestroyOnLoad scene), and quest entries are reset as i wanted.

However: dialogues remains the same at the last spoken phase. It is not going back to the first dialogue and restarting conversation unless i exit from runtime and rerun the game.

Is there a way to restart the dialogues with reset button from the begining without exiting the game or runtime?
Try this:

1. Replace RememberCurrentDialogueEntry with a Conversation State Saver component.

2. Use this code:

Code: Select all

DialogueManager.ResetDatabase(DatabaseResetOptions.RevertToDefault);
Scene scene = SceneManager.GetActiveScene(); 
PixelCrushers.SaveSystem.RestartGame(scene.name);
Post Reply