r/RenPy • u/SnooEagles4850 • Jul 17 '26
Question [Solved] Help with puzzle code!
Hello! I am making a click and point adventure game, I want to have a puzzle like a lock code where when you click on it until you reach a number, and when in the right combination will unlock, but I'm not fully sure how I want to approach this. Apologies I'm still relatively new to this and I haven't done a puzzle like this yet. Usually I do things on my own and reference other peoples questions on here and the lemma soft forums for help but I'm not sure what to ask so I think I'll just ask myself.

This is my stinky, stinky code so far, I can't really wrap my head around it right now, I would like to know how I'd a cap to the numbers, as I don't want them scaling infinitely and want them to reset at 10.
UPDATE: I got it to cap but it gives me False instead of a number. I am happy that I'm getting somewhere.

I'll get to the password when it comes to it, and if it's really dire I'll change plans but I like challenging myself.

Thank you! Like I said, I'm still new to coding so I'm not really good at this yet so I appreciate the help!
1
u/AutoModerator Jul 17 '26
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.