Pixi’VN
Narration

Eingabeaufforderung

So forderst du den Spieler in ink mit dem "# script" von Pixi’VN zur Eingabe von Text oder Zahlen auf und greifst innerhalb deiner Geschichte auf das Ergebnis zu.

Die ink + Pixi’VN-Integration führt ein "# script" ein, mit dem du dem Benutzer eine Eingabeaufforderung anzeigen kannst. To do this, you need to use the following syntax:

# request input type string

Verfügbare parameters (alle optional): type, default.

Der eingegebene Wert wird im Speicher unter dem Systemschlüssel _input_value_ abgelegt. Du kannst daher in deinem ink-Inhalt mit { _input_value_ } darauf zugreifen.

Zum Beispiel:

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