Tracking quest progress.
-
- Posts: 97
- Joined: Thu Aug 12, 2021 6:39 pm
Tracking quest progress.
Hello! Let's say you're trying to make a quest to kill x amount of something. Do I have to manually call DialogueManager.Instance.SendMessage("UpdateTracker"); in order to update the HUD? Or is there any automatic way for the quest to realize that it depends on a certain variable and update itself? Thanks!
-
- Posts: 97
- Joined: Thu Aug 12, 2021 6:39 pm
Re: Tracking quest progress.
I guess I should be more clear. The quest log UI seems to update with the correct number but the HUD is just frozen with 0/3 (0 being the [var=myquestvar]). I'm still trying to figure out how to update it. It does get updated when the quest is completed because I have a condition monitor that updates it, but I'm wondering if the system can track that variable and update the HUD automatically at runtime.
Re: Tracking quest progress.
Hi,
After changing the variable, call DialogueManager.SendUpdateTracker().
Quest entries can have [lua(code)] tags, which could call any C# method(s) that you've registered with Lua. So there's no way to automatically monitor for changes in all situations. Instead, when you manually call DialogueManager.SendUpdateTracker(), it tells the Dialogue System to update the HUD -- and the quest log window if it's open.
Note: The Increment On Destroy component automatically calls SendUpdateTracker when it increments its variable.
After changing the variable, call DialogueManager.SendUpdateTracker().
Quest entries can have [lua(code)] tags, which could call any C# method(s) that you've registered with Lua. So there's no way to automatically monitor for changes in all situations. Instead, when you manually call DialogueManager.SendUpdateTracker(), it tells the Dialogue System to update the HUD -- and the quest log window if it's open.
Note: The Increment On Destroy component automatically calls SendUpdateTracker when it increments its variable.