Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Is there any way to add a personalized name to a character?

Hi, i'm quite new to twine and I've started tying to create my own interactive adventure in the software. is there any way for the player to be able to type in their own name at the start of the story to use all the way through, i thought it would be really cool if you could type in your name and play as yourself through the story. is there any way to accomplish that?

Comments

  • How you would do it depends on the story format you're using.

    Assuming you're using Harlowe then you can use the (prompt:) macro
    (set: $name to (prompt: "What is your name?"))
    (if: $name is "")[(set: $name to "J. Doe")]
    

    That code opens a dialog box asking the player's name. If they don't enter anything then it sets the name to a default value.
Sign In or Register to comment.