Re: IQuestStateListener
Posted: Thu Oct 08, 2020 4:49 pm
Hi,
The QuestStateIndicator component shows the desired indicator that's highest in its list of indicators.
(More info)
Yes. Add a script to the Dialogue Manager with an OnQuestStateChange method. Example:Ultroman wrote: ↑Thu Oct 08, 2020 3:17 pmI have a bunch of delivery quests, so I'll have to change the state of the quest entries between being "active" and "success" depending on whether the player currently has the required items in their inventory. I can set up my own triggers to update those, BUT then I also need to update the Quest Indicators by calling QuestLog.UpdateQuestIndicators("questName") every time I change the state of an entry, right? Since the hand-in condition checks the states of its entries. This is the way?
Code: Select all
void OnQuestStateChange(string questName) // Also called if an entry in quest changes.
{
QuestLog.UpdateQuestIndicators(questName);
}
Each QuestStateListener registers its desired indicator with the QuestStateIndicator component.Ultroman wrote: ↑Thu Oct 08, 2020 3:17 pmSecond problem. This is all fine until you have more than one quest "active" or "grantable" with the NPC. Which one takes priority for the Quest Indicator when there are several QuestStateListener components on the same NPC? Optimally, the Question Mark would have priority, but it looks to me like it's just whichever quest last had its state updated. I think one would have to iterate over all available quests and do checks, in order to really determine which indicator should be shown.
The QuestStateIndicator component shows the desired indicator that's highest in its list of indicators.
(More info)