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.
I have a gallery built in that typically unlocks an image as it is seen in the game. But I would rather use a code in the script file itself that unlocks an image of my choosing.
I've tried in my script file:
While running game code:
File "game/script.rpy", line 82, in script
$ Gallery.unlock_image("ImageIWantUnlocked")
File "game/script.rpy", line 82, in <module>
$ Gallery.unlock_image("ImageIWantUnlocked")
TypeError: unbound method unlock_image() must be called with Gallery instance as first argument (got unicode instance instead)