Howdy, Stranger!

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

Following link sets variable

I'm sure there's an easy way to do this but I just can't find it. I'm in Twine 2, so using Harlowe by default but willing to switch.

I want the player to be taken to the same passage next, but depending on which option to proceed they chose, a variable is set to different things. Say, picking an object to bring before they head down a path. They'll be going down the same path no matter what, but later it will matter which object they brought with them.

Sorry if this is a stupid question...


  • edited May 2017
    The link type you're describing is commonly known as a Setter Link, in Harlow they are implemented by combine a (link: ) macro with a (set: ) macro and a (go-to: ) macro like so:
    (link: "Click Here")[
    	(set: $var to "value")
    	(go-to: "Target Passage")
  • Thank you!
  • edited May 2017
    You can even make like that:
    (link: "Go Home")[
        (set: $location to "Home")
        (goto: $location)
    Of course you have to have a passage named "Home" to make it work.
Sign In or Register to comment.