Calling Image Attribute by Variable
Posted: Sun Jan 12, 2020 3:16 am
I'm trying to implement a semi-randomized outfit system where a character is dressed consistently for a period of time. I'm currently using a layered image system for the clothing sprites and it works great, but I'm a bit stuck on how to approach the randomizer system. I was thinking of something kind of like this:
But that doesn't work due to the way layer image attributes are called. Does anyone have tips on how to tackle this problem?
Code: Select all
$ bottom = renpy.random.choice(["pants"]) $ top = renpy.random.choice(["collar", "longsleeve", "sweater"]) show npc armscrossed happy [bottom] [top]_armscrossed