Howdy, Stranger!

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

Jump to Random passage?

Is it possible (and easy!) to make a link from one passage jump to one of a number of random passages?

For example, if the choices at the end of a passage include: "Open the red door", can I somehow make a RANDOM choice between, say, two other passages, one where the room contains a lion and the other where the room is empty, and then continue my story from that particular passage?

I'm using plain, just downloaded, Twine 2 with no add-ons.

I've not actually used Twine at all yet, because I would need this functionality, and haven't been able to find it mentioned in the documentation.

Any help would be greatly appreciated! Thanks!


  • The way do it will depend on the story format you decide to use. Assuming you use Harlowe (which is the default) then you would use the (either:) macro to choose a random passage name, and the (link-goto:) macro to create the link.

    Something like this:
    (link-goto: "Open red door", (either: "lion room", "empty room"))

    This will create a link with the text "Open red door" which will take them to either the "lion room" or the "empty room" passage.
  • That's perfect, and is exactly what I was looking for. Thank you so much!
Sign In or Register to comment.