I'm using StoryCaption to display some character stats such as $PC.strength and have a clock variable in StoryBanner.
I want to make it so that those update when I make changes that don't trigger a passage transition. (such as via <<replace>>)
What I have is something like this
The replacements work fine, but the clock and stats in StoryBanner and StoryCaption don't update until I do something that changes passages.
In my searching the closest I've found to an answer was part of something 'Liz England' posted over on intfiction.org:
But as far as I can tell <<update>> does not seem to be an actual thing? or atleast adding it to my code threw a macro does not exist error. Maybe I just used it incorrectly?
What I've seen of State.??? while implementing keypress listeners seemed promising, but I can only seem to get changes to affect the main passage.
Does anyone know how to do this? I'm sort of expecting it to either be forehead slappingly simple, or the sort of thing that gets answered with lots of links to various coding wikis (either is fine)
I want to make it so that those update when I make changes that don't trigger a passage transition. (such as via <<replace>>)
What I have is something like this
<<click|link|timed "do push ups">> /% obviously timed wouldn't apply to pushups but you get the idea %/ <<set $PC.strength += 1>> <<replace>> ... /% the section of multiple passages that show you what exercises you can do %/ ... <</replace>> <<clockAdvance 15>> /% adds 15 minutes to the clock and thus triggers various hourly/daily/weekly changes as appropriate %/ <</click|link|timed>>
The replacements work fine, but the clock and stats in StoryBanner and StoryCaption don't update until I do something that changes passages.
In my searching the closest I've found to an answer was part of something 'Liz England' posted over on intfiction.org:
In order to have separate panes within the tool, I've always hijacked the StoryTitle and used it to display in-game information. You can put variables in the StoryTitle passage, but since that area doesn't refresh each time you click a link you also need to add <<update>> to your passages every time you want it to update.
But as far as I can tell <<update>> does not seem to be an actual thing? or atleast adding it to my code threw a macro does not exist error. Maybe I just used it incorrectly?
What I've seen of State.??? while implementing keypress listeners seemed promising, but I can only seem to get changes to affect the main passage.
Does anyone know how to do this? I'm sort of expecting it to either be forehead slappingly simple, or the sort of thing that gets answered with lots of links to various coding wikis (either is fine)