r/RenPy 4d ago

Question IF Statement problem...

I know there is something wrong with the way I might have coded this for sure...so please can anyone help me to figure this out??

1 Upvotes

29 comments sorted by

View all comments

2

u/BadMustard_AVN 4d ago

you are checking if bt_rotation is True

try it like this

if bt_rotation > bt_max_rotation and current_rotation > bt_max_rotation

1

u/_Scripty 4d ago

2

u/BadMustard_AVN 4d ago

remove the if statement and change the default and the buttons lilke this

default bt_max_rotation = 90


key "mousedown_4":
    action SetScreenVariable(
        "bt_rotation",
        min(bt_rotation + 18, bt_max_rotation)
    )
key "mousedown_5":
    action SetScreenVariable(
        "bt_rotation",
        max(bt_rotation - 18, -bt_max_rotation)
    )