Choice cofirmation

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
Albyd
Posts: 29
Joined: Thu Jul 21, 2022 4:46 pm

Choice cofirmation

Post by Albyd »

Is there any way to make a choice confirmation?
I'm thinking of a small window that opens once the player has clicked on one of the choices offered in the dialogue.
If the player responds YES, the windows will close and the dialogue in the background will continue.
If the player responds NO, the window will close and the player will be able to choose again from the choice menu.

Is there any wait to do so?

Many thanks.
User avatar
Tony Li
Posts: 22110
Joined: Thu Jul 18, 2013 1:27 pm

Re: Choice cofirmation

Post by Tony Li »

Hi,

Yes, and you don't have to modify any Dialogue System scripts. Although you may want to write a little script of your own.

When a response menu button's Button component > OnClick() event is completely empty, the StandardUIResponseButton component will automatically add its own OnClick() method to the event at runtime.

However, if you've assigned something to the Button's OnClick() event, StandardUIResponseButton will not automatically add its own OnClick() method. This is so you can do exactly what you describe. Configure the OnClick() event to call your own method that shows a confirmation window. If the player clicks to confirm, then call the StandardUIResponseButton's OnClick() method.
Albyd
Posts: 29
Joined: Thu Jul 21, 2022 4:46 pm

Re: Choice cofirmation

Post by Albyd »

Many thanks! It worked very well.
User avatar
Tony Li
Posts: 22110
Joined: Thu Jul 18, 2013 1:27 pm

Re: Choice cofirmation

Post by Tony Li »

Glad to help!
Post Reply