I'm using twine 2 with sugarcube 2. I have several passages in my storymenu. For example, inventory and stats. If I click on inventory and then immediately on stats, I get stuck in them and can't get back to the story. The same thing happens if the stats for example has a depth of more than one passage.
I've seen some games where the ui bar is automatically hidden during certain passages, likely to get around this, but I have no idea how to do that. I've also seen some talk about making the history skip certain passages so the <<return>> skips past them, but I haven't a clue on how to do that either.
Comments
1. Assign a tag (like noreturn) to each of your inventory/stats like passages.
2. Use a markup link like the following as the means to exit these tagged passages: 3. Add the following predisplay task to your Story Javascript: What the point 3 does is remember (in the $return variable) the last non tagged (with noreturn) passage displayed, and point 2 uses the value of $return to return back to the remembered passage.
Apologies for the necro-post, but I've been trying to get this to work on twine 2 with sugarcube 2.6.2, and have thus had no luck.
I've tried copying it word-for-word, added tags to my inventory passages, and inserted the javascript into the javascript section, but for some reason, when I put
to the inventory passage I want to lead back to my story (in a non-tagged passage), it takes me to a newly made passage with "$return" as the passage name rather than returning me to a previous passage.
I've attached a small file of my attempt to get this to work for kicks.
Any ideas/suggestions would be greatly appreciated.
Aarg, thanks a bunch for that, greyelf. I was thinking it was something I had stuffed up in the javascript or something. I was hoping the solution was something simple