Howdy, Stranger!

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

[SugarCube] Stats visible in the "menu" portion

Hey fellas, I have a gold and reputation variable which I want to be visible in the "menu" bar right under Saves and Restart.

I tried exporting the story and updating the code with the below but no matter where I put it, it always ended up in the story section.

<span id="box"><b><span class="limegreen">
Reputation: <<print $player.rep>><br>
Gold: <<print $player.gold>><br>
</span></b></span>

Comments

  • You either need to add it to an existing special passage, StoryCaption in this instance, or roll your own. If having it above the menu is okay, just use StoryCaption. If you absolutely want it below the menu, then you'll have to roll your own (which I can describe how to do, if necessary).
  • You either need to add it to an existing special passage, StoryCaption in this instance, or roll your own. If having it above the menu is okay, just use StoryCaption. If you absolutely want it below the menu, then you'll have to roll your own (which I can describe how to do, if necessary).

    How do I add it to a "special passage"? From what I read there was a special menu in older Twine versions that allowed you to set story settings but I don't believe I can do it in Twine 2. Could you please explain in detail? Thx

    BTW, above the menu is alright.
  • A Special Passage is a passage with one of the pre-defined name listed in the SugarCube passage names section of the documentation.
    note: not all special passage names are relevant in Twine 2.

    eg. Add a new passage to your story and name it StoryCaption
  • As greyelf notes, the thing that makes a special passage "special" is its name.
  • Thanks guys! Happy new year ;)
Sign In or Register to comment.