0 votes
by (750 points)
should be self explainatoty but how do i convert <<set $Varible to 100>> as a full bar(like a health gauge) and lower when the variable is under 100. also can it change colors from red as low to blue as 100%?

1 Answer

0 votes
by (41.9k points)

I have some Twine/SugarCube code you can use for a health bar here.  (Click "Jump to Start" on the UI bar to see other sample code there.)

If you take a look at the bottom of that page you will see that I added some code that does what you describe.  It uses the HSL (hue, saturation, and luminience) colorspace to change the hue of the healthbar (see this HSL calculator if you want to use different values).

If you have any questions about it, just ask.

Hope that helps!  :-)

Welcome to Twine Q&A, where you can ask questions and receive answers from other members of the community.

You can also find hints and information on Twine on the official wiki and the old forums archive.

See a spam question? Flag it instead of downvoting. A question flagged enough times will automatically be hidden while moderators review it.
...