If you're having trouble or run into any bugs with the code, post a comment here! I will try to get back to you within a few days.
Hi Feniks,
I would like to use your circular bar in my project to display some stats and I have some troubles modifying example 2 to suit my needs.
For context on what I'm trying to do, I'm able to modify the line
text "[percentage_value]%"
to
text "[points]/100"
but I'm unable to figure out how to update the bar to reflect the global variable points.
I hope you'll be able to help. Thanks!
You set a bar's value using the value property - so, in the example you're referring to, you'll see the property value ScreenVariableValue('percentage_value', 100)
This means it is tracking the screen variable called percentage_value, and the range is 100 (implicitly the start is 0 so it goes from 0-100).
You can do this same kind of thing for other values. For example, assuming points is a defaulted non-screen variable, value VariableValue("points", min=0, max=100) would work, with the min/max set up appropriately. You can see BarValues here: https://www.renpy.org/doc/html/screen_actions.html#VariableValue