Is there a way to list all available images by supplying the name and a list of tags? E.g. I have a scene with a building and people walking around in daytime - "building busy day.png" and I want to add another one e.g. "building busy day 2.png", so when I list the name = "building", tag_list=["busy", "day"], I will get ["building busy day", "building busy day 2"] so I can then choose (randomly) what to show. The issue is that I don't know which location/tag combinations will have more than one image, so I can't have it "hardcoded" in the game.
P.S. I tried searching in the forum for similar questions, but it keeps returning HTTP500 error and Google search doesn't come up with an answer.
List available scenes with tags
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.
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.
- Kia
- Eileen-Class Veteran
- Posts: 1040
- Joined: Fri Aug 01, 2014 7:49 am
- Deviantart: KiaAzad
- Discord: Kia#6810
- Contact:
Re: List available scenes with tags
if you add all of your images to a list you can get the length of that list with code
Code: Select all
default images_list = [
"bild1.png",
"bild1.png",
"bild1.png",
]
...
for i in range(len(images_list):
...
Who is online
Users browsing this forum: No registered users