Howdy, Stranger!

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

Custom Player name + Print lines on mouse click.

Hey I'm just starting with twine to put a story up but I have two things I'd like to do.

1. Set up a player input to save a name to be used later on

(If possible to have a preloaded name if the player doesn't want to like Zelda allowing a name input but being called Link as standard.)



2. Have it so that different lines of text appear on the same page

eg.
Line 1: Hey there.
*Mouse Click*
Line 2: Hey
*Mouse Click*
Line 3: What's up? [Shows link to next page]

Comments

  • When asking a question, please state which story format you're using. Harlowe is the default for Twine 2.

    Here is a good place to start if you've not found it yet: http://twinery.org/wiki/twine2:guide

    I'm not a Twine 2 guy and I barely know anything about Harlowe's syntax, but a forum search for your question found this thread: http://twinery.org/forum/discussion/2201/textinput-in-twine-2
    Basically:
    (set: $goal to (prompt:"A goal I have in my life is to:"))

    See also this blog post I found with a Google search: http://scopecreepstudios.com/blog/2015/01/11/44/

    Hope that helps!
  • The Prompt works perfectly but still need a hand with the other issues. the Scopecreep site I didn't quite get to too clearly, I haven't touched scripting in years java or any other.

    Been trying to find out to do the Line print on click without having to use a seperate passage for each one. any idea?
  • I've never made anything in Harlowe, so I have no idea. If this were Twine 1 or if you were using SugarCube instead of Harlowe, I'd say you could probably use the replace macro.

    That is, if i understand your question correctly.

    Sorry, I just know basically nothing at all about Twine 2/Harlowe and really need to sit down and make a quick, simple game if for no other reason than to answer questions like this.
  • edited May 2015
    With regards to the player name, greyelf provided a solution:
    greyelf wrote: »
    The Harlowe documentation is here.

    Harlowe does not have a built-in equivalent to Twine 1's <<textinput>> macro, although it does have a (prompt:) macro which uses a prompt dialog to obtain a value.
    (put: (prompt: "What's your name?") into $name)
    Your name is $name.
    

    There is this hack written by @csalzman which tries to get around this limitation of Harlowe.

    Keep in mind that this seems to be the only way to have anything like this; it displays a popup window with a separate input box, but it does save the input as a variable.

    The second part of your question sounds like the job for a link.
    (link: "Text to click on")[Output text]
    

    Does that help?
  • Thanks for the replies, The Custom name issue has been sorted with this replies and thank you very much!

    the second issue though isn't quite what i was after Neoroman. I want to keep the old lines on the screen when the new ones are printed onto it,

    Imagine a Powerpoint where each line comes on at a time but it keeps the same page.
    Otherwise I'd need to make 400+ passages to finish this haha
  • An demo of Neoroman's (link:) macro answer using the example from your original post:
    Line 1: Hey there.
    (link: "continue")[
    Line 2: Hey
    (link: "continue")[
    Line 3: What's up?
    [[link to next page]]
    ]]
    

    Though generally it is normal for a Twine story will consisted of many, many passages.
  • Ah I see, that works perfect, thanks again everyone!
Sign In or Register to comment.