0 votes
by (250 points)
closed by
This one should be fairly easy to answer, but my google-fu has failed me thus far.

Is there a way to force the StoryMenu sidebar to update WITHOUT changing passages? I have a "Spellbook" popup link that I want to keep hidden until the player knows at least one spell, and the logic works just fine, but right now it requires a passage change to display. Since the event that causes a spell to be learned also originates in a popup menu, this is a problem.

I tried using a simple span and replace method, but it throws errors and hides elements I don't want hidden  - I'm presuming that such behavior is born out of the link-only nature of StoryMenu.
closed with the note: Question answered.

1 Answer

+1 vote
by (61.3k points)
selected by
Best answer

You can use the UIBar.setStoryElements() method: 

<<link "Change stuff">>
    /% change a variable that has an <<if>> in the StoryMenu %/
    <<run UIBar.setStoryElements()>>


by (250 points)
<<run UIBar.setStoryElements()>>

This is exactly what I needed, thanks!