Delay before hidding response menu

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
OwlionDemanix
Posts: 4
Joined: Fri Oct 20, 2023 11:16 am

Delay before hidding response menu

Post by OwlionDemanix »

Hello,

I would like the response menu not to close automatically when I click on a response.
Instead, I would like to let one of my script do some stuff, and then trigger manually to hide the response menu and to continue the conversation.
Can I handle it with a sequence ?

Thank you in advance.
User avatar
Tony Li
Posts: 21676
Joined: Thu Jul 18, 2013 1:27 pm

Re: Delay before hidding response menu

Post by Tony Li »

Hi,

If you assign your own method to the response button's UI Button component > OnClick() event, the StandardUIResponseButton component will not automatically add its own OnClick() method to the Button's OnClick() event at runtime. Your method can do whatever you want first. When it's done, manually call the response button's StandardUIResponseButton.OnClick() method. This will close the response menu and send the response to the Dialogue System.
OwlionDemanix
Posts: 4
Joined: Fri Oct 20, 2023 11:16 am

Re: Delay before hidding response menu

Post by OwlionDemanix »

Thank you!
User avatar
Tony Li
Posts: 21676
Joined: Thu Jul 18, 2013 1:27 pm

Re: Delay before hidding response menu

Post by Tony Li »

Glad to help!
Post Reply