叙事
输入提示
如何使用 Pixi’VN 的“# script”在 ink 中请求玩家输入文本或数字,并在叙事内容中访问输入结果。
ink + Pixi’VN 集成引入了一个“# script”,可向用户显示输入提示。 To do this, you need to use the following syntax:
# request input type string可用的 parameters(均为可选):type、default。
输入的值会以系统键 _input_value_ 保存在存储中,因此你可以在 ink 内容中通过 { _input_value_ } 引用它。
例如:
=== 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