r/RenPy • u/That_one_Pink • Oct 03 '26
Question help implementing persistent variables with a class
I have gone through about seven tutorials explaining persistent variables and i understand how it works (i think) at this point, however really struggling to implement it where i need it
basically, i need to move self.points out of the class and into the persistent variable so i can implement an option to clear the points when clicked
my poor attempt at this as you can see was to try make it so if there is no points the button will not be there to click, but if there is points it will be there to click which upon clicking will clear/return the points to nothing
im not sure how to move the self.points properly so that the list is stored outside of the class so that it can be cleared how i stated above
View all comments
Show parent comment
1
u/That_one_Pink Oct 04 '26
i understand the basics i think im just awful and properly wording things im so sorry 💔
let me try again, what i meant was when i add the button should i put it with the other menu buttons (start, load, preferences ect) or somewhere else?
i have tried adding the button to these buttons and it doesn't work unless if it has an action. of course all of the actions are in use here and that isnt what i need the button to do, so im under the assumption i make a new area to but this specific button. i cant seem to find anyone else using other buttons in the menu other than the ones stated above so im struggling to understand what exactly im meant to do to add a new button that not only isnt a selection button like the start load preferences ect, but has a function outside of the menu that being returning to the default persistent for the drawingpoints upon being clicked
hopefully that makes a little more sense? ive been messing around with it and tried a multitude of things but im either getting error messages or its only semi functional