Does naninovell script support keyboard input?

Discussion of topics that don't fit other sub-forums.
Post Reply
booksuny
Posts: 47
Joined: 26 Sep 2022 12:37

Does naninovell script support keyboard input?

Post by booksuny »

I'm sorry I have a lot of questions.

I want to put QTA mini game using keyboard input during game.

Looking at the manual, I'm asking you a question because it seems that there are only menus that are opened using the keyboard.

Is there a function to choose a choice using keyboard input in naninovell script?

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

Re: Does naninovell script support keyboard input?

Post by idaot »

Naninovel supports basic keyboard navigation by default via the Legacy Input Manager (and the new Input System if using it instead). You can find the legacy bindings in the Input Manager under Project Settings. If you want to trigger buttons with an arbitrary key, consider setting up samplers for the buttons. An example of such can be found in the Inventory example project mentioned in the Input Processing guide: https://naninovel.com/guide/input-proce ... processing

booksuny
Posts: 47
Joined: 26 Sep 2022 12:37

Re: Does naninovell script support keyboard input?

Post by booksuny »

idaot wrote: 25 Oct 2022 09:42

Naninovel supports basic keyboard navigation by default via the Legacy Input Manager (and the new Input System if using it instead). You can find the legacy bindings in the Input Manager under Project Settings. If you want to trigger buttons with an arbitrary key, consider setting up samplers for the buttons. An example of such can be found in the Inventory example project mentioned in the Input Processing guide: https://naninovel.com/guide/input-proce ... processing

Thank you for your answer, and I have additional questions.

Does naninovell provide the ability to add keyboard input to the @choice function?

Like classical RPGs, I want to select a choice with a numeric key, or I want to control the selection button action that sometimes appears with a WASD key.

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

Re: Does naninovell script support keyboard input?

Post by idaot »

Choices are meant for simple story navigation so technically it's not ideal to go beyond that - but you are free to add custom scripts to the buttons, including ones for activating different input samplers and have them invoke select upon input activation.

booksuny
Posts: 47
Joined: 26 Sep 2022 12:37

Re: Does naninovell script support keyboard input?

Post by booksuny »

idaot wrote: 27 Oct 2022 09:21

Choices are meant for simple story navigation so technically it's not ideal to go beyond that - but you are free to add custom scripts to the buttons, including ones for activating different input samplers and have them invoke select upon input activation.

Thank you for your reply.
I want to make sure that I understand well because I am not good at English.

  1. You cannot assign keyboard input to @choice.
  2. If you want to use keyboard input, you should make your own buttons and use them.

Did I get it right?

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

Re: Does naninovell script support keyboard input?

Post by idaot »

  1. You can't do that via @choice, that's right.
  2. Yes, you can make a button for each of the keyboard input you want to activate. You should be able to make a custom script with a public/serialized string value in which you can specify the sampler you want to activate and change it with each variation.
Post Reply