Howdy, Stranger!

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

Is it possible to create a link to a passage without using previous function?

I am working on an RPG-style twine game. Using the StoryMenu passage I created a link to a stats page, a link to a spells page, and a link to an inventory page. In order to link back to the last "story related" page when on one of the menu pages, I created a $page variable, and on each of the "story related" pages, set the variable to the name of that page. On each of my "menu" pages I created a link [[Go back|$page]] to take the player back to the last non-menu, "story related" page. However, when I test play the game, using the [[Go back|$page]] link results in an error saying that the passage does not exist. I am sure that I spelled the passage names correctly every time I set the $page variable.

The reason I am using a page variable is because I want the player to be able to return to the story in a single link, even if they clicked back and forth between menu links a bunch of times. If anyone can help me, I would be very appreciative.

Comments

  • Yes, you can set a variable, manually or otherwise, and then use that within the [[wiki-link]] markup.  Why your code isn't working is anyone's guess (nothing jumps out at me from the description).  You'd have to show you work before we could tell you what's wrong with it.

    That said, check out the answer from the How to quit a circular previous() thread.  It contains a, largely, automatic solution to your problem.
  • Umm...I can show you my work, I guess, but I don't exactly know how to do that.
  • Copy what you have on your passage that your having a problem on here. Highlight the text and copy/paste. :)
  • It appears that the problem has resolved itself, though I am always skeptical whenever that happens. Regardless, thank you guys for the help.
Sign In or Register to comment.