Picking a Character name from a list and entering character names

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


K.V.

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}!

ooo, I like that rotate KV. Thanks


K.V.

Thanks, Padrinos!

I found rotate while looking through the GH-pages branch on GitHub not too long ago.

I just noticed I forgot to put some text over it, like, "Click the link to change the selection, then click Submit."

(Whoops.)


This topic is now closed. Topics are closed after 180 days of inactivity.

Support

Forums