Discuss how to use the Ren'Py engine to create visual novels and story-based games. New releases are announced in this section.
Forum rules
This is the right place for Ren'Py help. Please ask one question per thread, use a descriptive subject like 'NotFound error in option.rpy' , and include all the relevant information - especially any relevant code and traceback messages. Use the code tag to format scripts.
So I have a preferences screen with several options to customize a players experience. I did want to add a couple of quick select buttons. Now I could use screen language to make the quickselects but it has some pitfalls and makes it all very unreadable. So I wanted to put everything in a function. I have found out however that Ren'Py ignores all logic in the function and takes whatever is set last as the new setting. It won't even allow the buttons to change the persistent variables anymore.
I have tried googling what I've been doing wrong and tried several permutations to get it to work but I don't seem to get anywhere. What am I missing? Is it even possible? The intention is to encourage several playthroughs so I don't want the player to setup preferences multiple times hence the choice for persistent variables.
That solved it OMG Thank you! I called the function as a regular function in screen language. I had been stumped for about a week now! Never would have caught that. I am happy it was a relatively small issue.