Page 1 of 1

Reevaluate/Refresh dialogue options in "real-time"

Posted: Sun Jul 16, 2023 8:16 pm
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!

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

Posted: Sun Jul 16, 2023 8:23 pm
by Tony Li
Hi,

Call DialogueManager.UpdateResponses(). This will re-evaluate conditions and update which response buttons are shown in the dialogue UI.

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

Posted: Mon Jul 17, 2023 6:46 am
by Abelius
"Update", that's the word I was looking for, haha!

Thank you.

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

Posted: Mon Jul 17, 2023 10:08 am
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. ;-)