# In Ren'Py, how do I show a different image depending on variables?

At the start of my RenPy game, the player chooses a male or female character. The game plays out the same for both, save for some details.

The problem is that I want to write:

show hero normal


and get the image of the correct sex of the character chosen at the start.

I started to write a python function to do this, but it looks wrong because there seems to be enough ATL language to do this, even if I can't find a way.

Any idea?

ATL doesn't have an if statement at the moment. You can use DynamicDisplayable for this - the code looks like:

image hero normal = ConditionSwitch(
"male", "male_normal.png",
"True", "female_normal.png")


I've added an ATL if statement to the list of things I'll add to Ren'Py in the future, since it really should be there.

• I did see this solution on the wiki and tried to use it but it didn't work and I was in a hurry, so I did use the less flexible but instantly working choice ATL block statement instead. Apr 22 '11 at 9:51
• Any updates on this answer? oris this still the way to go?
– Goot
Jan 19 '16 at 12:21

Someone on this forum showed me that I could use choice in ATL :

image hero normal:
choice( hero_sex == "man" ):
"hero_man_normal.png"
choice( hero_sex == "woman" ):
"hero_woman_normal.png"


Not perfect solution but simple enough to solve my problem.