Howdy, Stranger!

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

Return to last passage from inventory in Sugarcube 2.18.0

Using Twine 2 and Sugarcube 2.18.
Currently I have an inventory and several other side tabs i'd like the players to be able to access at anytime. I have them all tagged as "Menu", I've tried several different solutions from the forums but none have been formatted correctly for this version of Sugarcube. I would like to have a button or simple return link on each of my sidebar pages that will return the player to the last passage that wasn't tagged "Menu". As of now the game is manageable with the use of the back and forward arrows, but i'd really like to remove those eventually, if at all possible.
Thanks in advance!

Comments

  • edited May 2017
    I've tried several different solutions from the forums but none have been formatted correctly for this version of Sugarcube.

    Anything that works for 2 should generally work in 2.18; as far as I can tell, the story format authors do a great job of not breaking compatibility within a major version. One way would be something like this:
    ::StoryInit
    <<set $return to ''>>
    
    ::StoryMenu
    <<if !tags().includes('menu')>>
        [[Menu Item|menu1][$return to passage()]]
        [[Menu Item 2|menu2][$return to passage()]]
    <<else>>
        [[Return|$return]]
    <</if>>
    
    ::menu1 [menu]
    Stuff
    
    [[Return|$return]]
    
    ::menu2 [menu]
    More stuff
    
    [[Return|$return]]
    
Sign In or Register to comment.