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
DialogueManager.DatabaseManager.DefaultDatabase.quests?
Re: DialogueManager.DatabaseManager.DefaultDatabase.quests?
Hi Mike,
Use QuestLog.GetAllQuests(). This returns an array of quest names. Examples:
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.
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.
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?
Perfect, thank you for the help!!