Howdy, Stranger!

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

Make character's say player's name

Sorry for asking so many questions. Hopefully this will be my last one for a while.

How do I make a character in my game call the player by the name they input at the beginning?

I've used the very simple (Prompt: "What is your name?") for the beginning and, while it works, I don't know how to have the game remember the name you input.

Please help?

Comments

  • This is how its done in harlowe. You save the name as a variable with
    (put: (prompt: "prompt text") into $variable)
    

    and then simply write
    $variable
    

    where you want the name to be.
  • You need to state which Story Format you are using when you ask a question, as answers can be different for each one. Based on the syntax of your example I am going to assume you are using Harlowe.

    The example given in the (prompt:) macro's documentation shows how to save the value inputed by the Reader into a $name variable.
    You can later display the value within the $name variable in a passage by doing either of the following:
    name: (print: $name)
    
    or
    
    name: $name
    
Sign In or Register to comment.