Take the 2-minute tour ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

I'm in the end of finishing a little game for friends made with RenPy and I'm having a hard time finding a simple solution to do the following.

At the start of the game, the player choose between a male or female character. The game is the same with both but some tests that depends on it but it's not important and it works.

The problem is that I want to write :

show hero normal

and get the image of the girl if it was the choice, or the image of the boy if he was choosen at the start.

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

Any idea?

share|improve this question
add comment

2 Answers

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.

share|improve this answer
    
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. –  Klaim Apr 22 '11 at 9:51
add comment

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.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.