Reevaluate/Refresh dialogue options in "real-time"

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
User avatar
Abelius
Posts: 318
Joined: Fri Jul 21, 2017 12:45 pm

Reevaluate/Refresh dialogue options in "real-time"

Post by Abelius »

Hi there, I've done some searches but it's possible I wasn't particularly inspired with the key words.

I'd like to know if there is a more or less simple way to refresh/repopulate/reevaluate the dialogue choices that have been already been presented to the player, every second for example, as long as a choice isn't chosen.

I have a stat that keeps increasing while the player is making a decision, and I'd like a hidden choice showing up when that stat reaches 100.

I've managed to make this work by using a parallel FSM that checks the stat every second, and executes a "Jump to Entry" action that sends it to an entry before the Menu hub entry, and it's working. But I'd prefer a more "native" solution if one exists.

Thanks!
Unity 2019.4.9f1
Dialogue System 2.2.15
User avatar
Tony Li
Posts: 22125
Joined: Thu Jul 18, 2013 1:27 pm

Re: Reevaluate/Refresh dialogue options in "real-time"

Post by Tony Li »

Hi,

Call DialogueManager.UpdateResponses(). This will re-evaluate conditions and update which response buttons are shown in the dialogue UI.
User avatar
Abelius
Posts: 318
Joined: Fri Jul 21, 2017 12:45 pm

Re: Reevaluate/Refresh dialogue options in "real-time"

Post by Abelius »

"Update", that's the word I was looking for, haha!

Thank you.
Unity 2019.4.9f1
Dialogue System 2.2.15
User avatar
Tony Li
Posts: 22125
Joined: Thu Jul 18, 2013 1:27 pm

Re: Reevaluate/Refresh dialogue options in "real-time"

Post by Tony Li »

Glad to help!

The online manual's search functionality isn't great because it searches API references as well as manual text, so it returns a lot of extraneous info. One of these days OpenAI will scrape the Dialogue System online manual and forum threads, and you'll be able to ask ChatGPT. In the meantime, don't hesitate to ask here. I'll be your ChatGPTony for now. ;-)
Post Reply