Howdy, Stranger!

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

Very basic question

Hello fellow Twiners (Twinees?),

I need help. You are my only hope.
I've started messing about with Twine and have a practically no coding experience (save for a bit of missing about with Javascript on sites like Code Academy).

  For that reason I'm trying to keep it fairly simple and just stick to the basic format. What I would like to do though is make text change when I return to my 'Start' passage.

  I.e. to make it act sort of like a 'hub'. The hub has longer text, with more descriptions at first, so when I return, I want it to be shorter, with less detail  - because the player/read has seen it already - but with more or less the same options (like "Go to the Bank", etc.). If you get me.

  I know there are lots of resources for Twine 1.x but I can't seem to find what I'm looking for in Twine 2 - the new formats are confusing me.

 
P.S. Would switching to Twine 1 help me as a beginner? I hear there are more macros and such built in?

Comments

  • In SugarCube this can be easily done by using the (visited) function, but I don't know enough about Harlowe to say how to do that there.

    You could, though do it a super simple way by setting a variable to "true" once the player moves to any passage other than Start, and then make the text in Start conditional on what that variable is.


    E.g. in Start (syntax may be off since I don't use Harlowe)

    (if: $progress is false)"Hello!"

    (if: $progress is true)"Hello again!"

    And if your options are "go to bank" and "go to post office" then both in your bank and post office passages you would have:

    (set: $progress to true)

    So that any time after visiting the bank or post office, Start now displays the updated text. Though you'd need to also initialize $progress to false on story start, which, not being fluent in Harlowe, I can't explain how to do.
  • Hi! In Harlowe there is a macro called (history:) that tracks every passage the player has visited. You could use something like this:
    (if: (history:) contains "Start") [Hello again!] (else:) [Hello!]
  • Adding on to what delacannon said: if what you want is a block of text that only displays the first time you go to a passage, but the rest of the text shows up every time, you can modify that if/else slightly like so.
    (if: not ((history:) contains "Start"))[Welcome! This is your first time here.]

    This shows up every time.
  • A small warning about using (history:) to often in your story.

    Because it contains every passage the reader has seen, the time it takes to check if the history contains a particular passage is a little longer the further the reader navigates through your story. This is especially true if your story / game is RPG in nature.
Sign In or Register to comment.