I am trying to put stats into the now-stowable UI Bar of SugarCube 2 (for Twine 2).
Does anyone know how I can do that in such a way that it retracts when the bar retracts?
As for the stats themselves I am just setting variables at different parts of the story and reflecting them there. Nothing too fancy.
Any thoughts on the subject would be appreciated.
Thank you all.
Comments
@Sage: I'll reiterate that you should probably be using StoryCaption. However, now that you gotten me interested, what were you trying before that wasn't working?
Story-caption is what I SHOULD have been using all along.
Thanks everyone, for the code and the answers... it works great!
But to answer your actual question, it was the pop-up box UI API answer on your site that was good advice, yes, because it worked... but not exactly how I wanted.
I tried following this in SugarCube 2.0, and in Chrome I get a JavaScript error saying this:
The HTML file is attached.
It works fine in Firefox.
According to the data in the file you seem to be using Twine 2.0.5? Are you running the non-NW.js version of Twine 2 in Chrome? If so, did you get the error from a Test or Play? If so, did you try the published file in Chrome?
Note: Twine 2.0.5 contains bugs which negatively impact Test and Play. Twine 2.0.6 does as well, though not nearly as severe.
Hi @TheMadExile, you are right. The bug only occurs in Test and Play, not once the file is published. And yes, I am suing the html version of Twine 2.0.5. I haven't yet upgraded to 2.0.6.
But since this is a known issue, and since it only affects Test and Play, i guess that's fine.
Thanks. (I'll have to spend time now learning SugarCube code, as I got fairly used to Harlowe!)