- Aug 28, 2018
- 1,217
- 778
I'm working on a mod of an existing game (which means I'm mostly just tweaking little things here and there, so I haven't needed a high level of expertise in Python so far), and I'd like to do a function where pressing a certain button will just yield a random image from a specific folder. I know you can do like
renpy.random.choice(["imageone.png", "imagetwo.png", "imagethree.png"]), but I'm expecting to have quite a lot of images in that folder, so I want to set it up where I can just move images in and out freely without having to rename or define them, or do anything additional to make them be recognized by the existing function. What's the best way to do that?
renpy.random.choice(["imageone.png", "imagetwo.png", "imagethree.png"]), but I'm expecting to have quite a lot of images in that folder, so I want to set it up where I can just move images in and out freely without having to rename or define them, or do anything additional to make them be recognized by the existing function. What's the best way to do that?
Last edited: