Howdy, Stranger!

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

How do you add information to the sidebar in sugarcube 2

For example, a tab that says people and links to a passage containing people you know that changes as you meet those people, each linking to passage about that person that changes as you learn more about them, with the ability to click back until you're back in the passage prior to clicking the person tab.

Comments

  • I've found out how to add the sidebar options, but I'm not sure how to make the passages change to add more information as the pc learns more, or how to back out of it without getting stuck in a loop.
    Even if somebody could just toss me a hint. Something to google, that'd be great.
  • This topic here explains how to avoid the 'back' loop by assigning a 'noreturn' tag on the passages you don't want to return to.

    twinery.org/forum/discussion/4946/how-do-i-get-around-return-and-back-getting-me-into-a-loop






  • There are a number of different ways to conditionally show information within the StoryCaption special passage, one of the easiest is to use $variables.

    The following is an example that uses two variables $havePet and $petName to show conditional information to the reader, the first variable is a Boolean (true/false) and the second is a String.
    <<if $havePet>>
    Pet Name: $petName<</if>>\
    
    If the $havePet variable equals false then the related text will not appear, when true the text will show whatever name is in the $petName variable. If the name within $petName is changed within a passage then the name displayed will be automatically updated.
Sign In or Register to comment.