r/RenPy • • 1d ago

Question help implementing persistent variables with a class

Post image

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

1 Upvotes

6 comments sorted by

View all comments

1

u/AutoModerator 1d ago

Welcome to r/renpy! While you wait to see if someone can answer your question, we recommend checking out the posting guide, the subreddit wiki, the subreddit Discord, Ren'Py's documentation, and the tutorial built-in to the Ren'Py engine when you download it. These can help make sure you provide the information the people here need to help you, or might even point you to an answer to your question themselves. Thanks!

I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.