I want my player to be able to enter their name and choose a job (handy man or something). How could I do a name input
Hello,
This may help out a little:
@title Setup
#### Welcome to the gamebook!
[[BEGIN]]
[[BEGIN]]:
@clear
var name = prompt ("Please enter your first and last name.", "");
name = name.split(" ");
if (name.length != 2) {
squiffy.story.go("BEGIN");
return;
}else{
set("named", true);
var firstName = name[0];
var lastName = name[1];
set ("firstName", firstName);
set ("lastName", lastName);
squiffy.story.go("welcome");
}
[[welcome]]:
@clear
Welcome, {firstName} {lastName}!
### Which career suits you?
**{rotate c1:handyman:auto-mechanic:doctor}**
[[Submit]]
[[Submit]]:
You chose {c1}!