A ConditionSwitch can only give you one image. It sounds like you're going to have a composition of two images: one for the base, and one for the hair. In this case, you'll need not just one ConditionSwitch, but two. Then you'll probably want to combine the ConditionSwitches into one image with
im.Composite.
Code: Select all
show_side_image=im.Composite(
(300, 600)
(0, 0),
ConditionSwitch(
"skin == 'pale'", Image("PC female/skin pale.png", xalign=0.0, yalign=1.0),
"skin == 'tan'", Image("PC female/skin tan.png", xalign=0.0, yalign=1.0)
),
(0, 0),
ConditionSwitch(
"hair == 'normal'", Image("PC female/hair normal.png", xalign=0.0, yalign=1.0),
"hair == 'long'", Image("PC female/hair long.png", xalign=0.0, yalign=1.0)
)
)
(300, 600) specifies the width and height of the im.Composite "container" that holds all of the individual images. You should change this to fit your images. The first (0, 0) is the x,y position of the first image within this container, and the second (0, 0) is the x,y position of the second image.
(Once you've done all that, that should take care of the image positioning already, so I don't think you have to specify xalign and yalign within Image() - but anyway, you can play around with it.)