Quest Problem

Announcements, support questions, and discussion for the Dialogue System.
Barto1983
Posts: 24
Joined: Thu Mar 02, 2017 8:52 am

Quest Problem

Post by Barto1983 »

Hello Tony Li,

I have a problem with the quest.

Some event seems to me to be missing.

I have the following quest. The quest is active as you see.
The attachment img01.JPG is no longer available
Now I want to change the status.
I tried it in three different ways.
The attachment img02.JPG is no longer available
img01.JPG
img01.JPG (33.15 KiB) Viewed 1186 times
Unfortunately, none of them go away.

Will I possibly miss an event?
Barto1983
Posts: 24
Joined: Thu Mar 02, 2017 8:52 am

Re: Quest Problem

Post by Barto1983 »

img04.JPG
img04.JPG (103.94 KiB) Viewed 1185 times
Barto1983
Posts: 24
Joined: Thu Mar 02, 2017 8:52 am

Re: Quest Problem

Post by Barto1983 »

I cant Upload the images

i try with code: Pixelcrushers……...QuestLog.SetQuestState(string,QuestState.Success)
or
Pixelcrushers……...QuestLog.SetQuestState(string,string)

and in the Conversation Dialogue Entry

Script

SetQuestState("Sendphotos","success")


nothing work
User avatar
Tony Li
Posts: 22145
Joined: Thu Jul 18, 2013 1:27 pm

Re: Quest Problem

Post by Tony Li »

Hello,

The Quests/Items section of the Dialogue Editor only shows the initial state of the quest:

Image

If you want to show the quest in the quest tracker HUD, tick Trackable and Track on Start.

If you want to see the current runtime state of the quest in play mode, use the Watches tab:

Image

You can also use a Lua Console to check the quest state. In the Lua Console, enter:

Code: Select all

return CurrentQuestState("Sendphotos")
The methods you are using to set the quest state are correct. Summary:
  • To set it using a component, use a Dialogue System Trigger. Add Action > Set Quest State.
  • To set it in a C# script, use QuestLog.SetQuestState().
  • To set it in a dialogue entry node's Script field, use the SetQuestState() Lua function. You can type it manually, or you can use the "..." wizard:
    Image

Also, make sure you've assigned the correct dialogue database to the Dialogue Manager.
Barto1983
Posts: 24
Joined: Thu Mar 02, 2017 8:52 am

Re: Quest Problem

Post by Barto1983 »

Hello Tony Li,

Thank you for your help. Always great.

You're right I can watch over the Watcher the quest.

Nevertheless, it does not work as usual with me.

Let's say I have a quest with the initial value active.

My game starts with Scene 1 -> value of the quest is active

My conversation is on. At the end of the conversation I invite Scene 2.

In the first Dialouge Entry, the quest is set to success.
(The watcher shows that the quest is success)

After the Converstion of Scene 2 is over. I invite Scene 1 again.

Now the value of the quest is Active again. But this is wrong, the value should be success.

That was not a problem with the Dialouge Manager 1.9. Somehow he had taken over automatically.

Do I have to adjust somehow something that he knows that the initial value has been overwritten?
User avatar
Tony Li
Posts: 22145
Joined: Thu Jul 18, 2013 1:27 pm

Re: Quest Problem

Post by Tony Li »

Hello,

How are you changing scenes?

Try adding a Dialogue System Saver component to the Dialogue Manager. Version 2 uses a new, improved save system. But you need to include Dialogue System Saver for it.
Barto1983
Posts: 24
Joined: Thu Mar 02, 2017 8:52 am

Re: Quest Problem

Post by Barto1983 »

Code: Select all

 
 //TODO Sende die Bilder an Jessica
        var Quests = PixelCrushers.DialogueSystem.QuestLog.GetAllQuests(PixelCrushers.DialogueSystem.QuestState.Active);

        foreach (var item in Quests)
        {
            switch (item)
            {
                case "Sendphotos":
                    PixelCrushers.DialogueSystem.QuestLog.SetQuestState("Sendphotos", QuestState.Success); 
                    SceneManager.LoadScene("Jessica01");
                    break;
                default:
                    DialogueManager.ShowAlert("There are no jobs available");
                    break;
            }
        }
When i am finish with the Conversation in the Scene Jessica01, then i have a Registred Lua Function

Code: Select all

public void LoadScene(string name)
    {
        SceneManager.LoadScene(name);
    }
The Switch between the scenes works perfect.


I try to add the Dialogue Manager the Dialogue System Saver (Script) And Check the Value Save Across Scene Change but it doesnt help.
User avatar
Tony Li
Posts: 22145
Joined: Thu Jul 18, 2013 1:27 pm

Re: Quest Problem

Post by Tony Li »

Can you use the built-in LoadLevel() sequencer command? This will save data in the current scene, then load the "Jessica01" scene, then apply the saved data to the "Jessica01" scene.

If you can't use LoadLevel() for some reason, please call PixelCrushers.SaveSystem.LoadScene("Jessica01") instead of SceneManager.LoadScene("Jessica01"). This will also save the data, etc., and it will call SceneManager.LoadScene for you.

Please also feel free to send an example to tony (at) pixelcrushers.com. I'll be happy to look at it directly.
Barto1983
Posts: 24
Joined: Thu Mar 02, 2017 8:52 am

Re: Quest Problem

Post by Barto1983 »

Thanks a lot for helping me!
User avatar
Tony Li
Posts: 22145
Joined: Thu Jul 18, 2013 1:27 pm

Re: Quest Problem

Post by Tony Li »

Did it work?
Post Reply