Want to respond immediately when click a button

Discuss authoring naninovel scenario scripts.
Post Reply
ilililli
Posts: 3
Joined: 02 Jun 2023 01:42

Want to respond immediately when click a button

Post 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.

idaot
support
Posts: 262
Joined: 01 Aug 2020 08:25

Re: Want to respond immediately when click a button

Post 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

ilililli
Posts: 3
Joined: 02 Jun 2023 01:42

Re: Want to respond immediately when click a button

Post 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.

idaot
support
Posts: 262
Joined: 01 Aug 2020 08:25

Re: Want to respond immediately when click a button

Post by idaot »

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

ilililli
Posts: 3
Joined: 02 Jun 2023 01:42

Re: Want to respond immediately when click a button

Post by ilililli »

I understand. Thank you!

Post Reply