Input
Accepting user Input
var script = {
// The game starts here.
"Start": [
"You'll see an input next",
{"Input": {
"Text": "What is your name?",
"Validation": function(input) {
return input.trim().length > 0;
},
"Save": function(input) {
storage.player.Name = input;
},
"Warning": "You must enter a name!"
}
},
"Hi {{player.Name}} Welcome to Monogatari!"
]
}Text
Validation
Save
Warning
Last updated
Was this helpful?