Want to respond immediately when click a button

Posted: 02 Jun 2023 01:56
by ilililli

Hello, I would like to see the content printed immediately if I click the button in the two situations below.

Situation 1.

Code: Select all

sample text....
@choice "sample text" goto:script.sample
sample text....

In this situation, there is no @stop command to show the texts below choice button.
When I chick that choice button, script don't go immediately to "sample" label, but after click the next script.
What should I do to respond immediately in @choice command without @stop command?

Situation 2.
In "Play Script On Unity Event", I make button to play "sample" script.
When I chick that button, script don't go immediately to "sample" script, but after click the next script.
What should I do to respond immediately in "Play Script On Unity Event"?
Thank you.


Re: Want to respond immediately when click a button

Posted: 02 Jun 2023 14:40
by idaot

@choice is mainly designed to be used with @stop and not having @stop will cause the dialogue to continue to the next line regardless of where you click on the screen. In case you want to show a piece of dialogue immediately upon clicking a choice, use the do parameter in @choice: https://naninovel.com/api/#choice


Re: Want to respond immediately when click a button

Posted: 03 Jun 2023 09:45
by ilililli

Thanks for your help, but it doesn't work immediately.

@choice "sample test" do:"@goto script.sample"

I tested script like this, but script go to "sample" label after click the next script.
Is there any other thing that I missed? thank you.


Re: Want to respond immediately when click a button

Posted: 03 Jun 2023 11:34
by idaot

That's by design. You need to add @stop after @choice.


Re: Want to respond immediately when click a button

Posted: 03 Jun 2023 12:40
by ilililli

I understand. Thank you!