LogoPixi’VN
Повествование

Запрос ввода

How to request text or numeric input from the player in ink using the Pixi’VN "# script" and access the result inside your narrative.

The ink + Pixi’VN integration introduces a "# script" that allows you to request an input prompt from the user. To do this, you need to use the following syntax:

# request input type string

Available parameters (all Optional): type, default.

The entered value is saved in storage under the system key _input_value_, so you can reference { _input_value_ } in your ink content.

Например:

file_type_ink
ink/start.ink
=== start ===
Hello,
# request input type string
<>what is your name?
My name is { _input_value_ }
# request input type number default 18
How old are you?
I am { _input_value_ } years old 
# request input type "html textarea"
Describe who you are:
{ _input_value_ }
Restart
-> DONE