Page 1 of 1

Choice cofirmation

Posted: Mon Apr 15, 2024 12:33 pm
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.

Re: Choice cofirmation

Posted: Mon Apr 15, 2024 3:43 pm
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.

Re: Choice cofirmation

Posted: Mon Apr 22, 2024 11:12 am
by Albyd
Many thanks! It worked very well.

Re: Choice cofirmation

Posted: Mon Apr 22, 2024 11:33 am
by Tony Li
Glad to help!