custom ResponseTimeoutAction toward a hidden menu text

Announcements, support questions, and discussion for the Dialogue System.
User avatar
Tony Li
Posts: 21055
Joined: Thu Jul 18, 2013 1:27 pm

Re: custom ResponseTimeoutAction toward a hidden menu text

Post by Tony Li »

Hi,

I didn't reproduce the issue in a new project.

The only thing I can think of is the SetTimeout() sequencer command. Do you have any dialogue entry nodes or Dialogue System Triggers that use this sequencer command?
joeylu
Posts: 111
Joined: Sun May 17, 2020 1:07 pm

Re: custom ResponseTimeoutAction toward a hidden menu text

Post by joeylu »

Hi Tony, while you were replying, I had edit my previous reply, I found the error exactly like you have mentioned, it was the SetTimeout override the global timeout. I also raised my concern about this behavior
joeylu wrote: Thu Jun 11, 2020 11:13 am ok, found the error, somehow in one dialogue entry, from the very beginning of the conversation, I put the SetTimeout(3) in the sequence. it actually overrides the global response timeout duration.
Maybe it's just me but I thought the dialogue entry sequence settings will only affect its own dialogue entry, not to overwrite the global. Otherwise, after setup a custom timeout, I have to reset it back the global value, this makes the "response timeout" setting in dialogue controller very usable. Or am I doing anything wrong, lol
User avatar
Tony Li
Posts: 21055
Joined: Thu Jul 18, 2013 1:27 pm

Re: custom ResponseTimeoutAction toward a hidden menu text

Post by Tony Li »

Thanks for pointing that out. I'll make it clearer in the manual that it sets the global timeout value. The intent is that it allows you to turn off timeouts for an entire section of a conversation (or even the rest of the game if you want to do that), not just the next response menu.
joeylu
Posts: 111
Joined: Sun May 17, 2020 1:07 pm

Re: custom ResponseTimeoutAction toward a hidden menu text

Post by joeylu »

np Tony, as long as I understand the logic, I can live with that. Again, tks for the great support
brian_nielsen
Posts: 4
Joined: Wed Mar 22, 2023 12:02 pm

Re: custom ResponseTimeoutAction toward a hidden menu text

Post by brian_nielsen »

Really loved this. It helped me a lot.

Just for anyone that would like it I used the logic to make a Response based version. I have a few events that fire when a response is selected so I did the following:

Code: Select all

 public class ChooseDefaultOnResponseTimeout : MonoBehaviour
    {
        private List<Response> _currentResponses = new List<Response>();       

        void OnConversationResponseMenu(Response[] responses)
        {
            _currentResponses.Clear();
            _currentResponses = responses.ToList();
        }

        void OnConversationTimeout()
        {
            //code from here: https://www.pixelcrushers.com/phpbb/viewtopic.php?t=3885        

            foreach(var response in _currentResponses)
            {
                if(response.destinationEntry.Title == "OnTimeout")
                {
                    DialogueManager.conversationController.SetCurrentResponse(response);
                    DialogueManager.conversationController.GotoCurrentResponse();
                }
            }
            
        }
    }
User avatar
Tony Li
Posts: 21055
Joined: Thu Jul 18, 2013 1:27 pm

Re: custom ResponseTimeoutAction toward a hidden menu text

Post by Tony Li »

Thanks for sharing!
Post Reply