Ren'Py RenPy, Help with bars not changing

risquéRevolver

The Great Equalizer
Game Developer
Feb 13, 2020
20
39
So I'm trying to create bars for a sex scene that show things like pleasure.

Python:
screen user_menu():
    $ love = Rachel.Pleasure
        fixed:
            bar:
                value love
                range 4096
                xsize 25
                ysize 525
I have buttons in a separate screen that are changing the value of Rachel.Pleasure, but the bar isn't changing even when the variable does. I've checked that the variable is changing with the console. I've also tried calling renpy.restart_interaction(), which apparently refreshes all screen elements. I've been able to get the bar to update by hiding and reshowing the screen, as well as using Shift+R to reload the game. Can anyone tell me what I'm doing wrong, or what I can do to work around this? Thanks.
 

risquéRevolver

The Great Equalizer
Game Developer
Feb 13, 2020
20
39
Aight, I figured it out almost directly after.

Python:
screen user_menu():
    $ love = Rachel.Pleasure
        fixed:
            bar:
                value FieldValue(Rachel,"Pleasure",range=4096)
                range 4096
                xsize 25
                ysize 525
Just needed to use FieldValue instead of referencing the value directly.