Page 1 of 1
DialogueManager.DatabaseManager.DefaultDatabase.quests?
Posted: Sat Sep 03, 2016 8:00 pm
by vantubbe
Why is there no accessor for the quests in the DialogueDatabase class? I see items, conversations, everything else etc. I basically want to run queries on the quests by fields within one of my scripts. Find quests that meet certain parameters. Wondering why there are accessors for everything but quests. Thank you!!!!
Mike
Re: DialogueManager.DatabaseManager.DefaultDatabase.quests?
Posted: Sat Sep 03, 2016 9:43 pm
by Tony Li
Hi Mike,
Use
QuestLog.GetAllQuests(). This returns an array of quest names. Examples:
Code: Select all
using PixelCrushers.DialogueSystem;
...
string[] allQuests = QuestLog.GetAllQuests(); // All quests.
string[] activeQuests = QuestLog.GetAllQuests(QuestState.Active); // Active quests.
The
QuestLog class provides a lot of other useful methods for working with quests, too.
Also, the QuestLog class works across all loaded databases, in case you've used the Extra Databases component or DialogueManager.AddDatabase() to load additional databases into memory.
Re: DialogueManager.DatabaseManager.DefaultDatabase.quests?
Posted: Sun Sep 04, 2016 12:33 am
by vantubbe
Perfect, thank you for the help!!