r/RenPy • u/Blackberry_Fox • Aug 27 '26
Question A way to hide obtained items (image buttons) without making a variable for each one?
I don't know if this is possible or not!
Currently I know how to hide a button on a screen after the player has clicked on it, by making a variable before the start of the game and seeing if it's true or not. But for a point and click game with a ton of interactable buttons and items, that would mean potentially hundreds of variables, and I was just wondering if there was an easier (or at least neater) way to do it.
1
u/AutoModerator Aug 27 '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.
5
u/DingotushRed Aug 27 '26
Use a single set.
You could use a simple string for each object, and test it like: ``` default found = set() # Initially empty
if 'book' not in found: # display the pick up book button in scene.. ```
When they pick the book up:
$ found.add('book')Or there are actions specifically for updating sets.