Howdy, Stranger!

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

Using and Updating the StoryMenu?

Hello, i am trying to learn how to use the StoryMenu in a dynamic way.

How would you go about updating the StoryMenu from passage to passage? Say if you have simple day system that would display Monday to Sunday with a string, and have a go to sleep passage, which would then progress to the next day and display that in the StoryMenu?

Also if you have simple value like an integer or something like.

Thanks :)

Comments

  • You should always state the story format you're using and its version, because advice will tend to vary based on that information.

    Since you're asking about StoryMenu, I'm going to assume you're using some version of SugarCube—though it would be nice to know which.


    The StoryMenu special passage is used to populate the story menu in the UI bar, so it only displays links, anything else is filtered out of the final output.

    If you want to print various and sundry values in that general area, you want the StoryCaption special passage. Like most of the special passages which populate a section of the UI bar, StoryCaption is processed every turn/passage navigation, so for the most part you simply need to print a variable or whatever and it will be updated automatically for you.

    For example, say you had a story variable named $day within which you store the name of the current game day, to display that you could do something like the following in your StoryCaption:
    Today is $day.
    
  • Sorry, i totally forgot. You were right though, I'm using Sugarcube 2.14.0

    It works now, when i put my code into StoryCaption.

    Thank you for the response and sorry for the inconvenience :smiley:

    much appreciated!

Sign In or Register to comment.