Discuss how to use the Ren'Py engine to create visual novels and story-based games. New releases are announced in this section.
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.
Lemme elaborate more. So, in a redesign I have been... considering... I want to make it so that the only character portrait that shows on screen is that of the currently speaking character.
Now there are 2 positions the character can be on. The left side (usually the one the player character is in), or the right side.
Now in each scene, which character will appear at which side is going to change. So my idea is, at the start of each scene, I could update a list variable called "lefty" to include all the possible character images for who will want to be shown on the left side in that screen.
As for the say screen: it would then check if the character image being used is in the lefty list. If it is, show it on the left-hand side of the screen. If it isn't, show it on the right-hand side and horizontally flip the image.
SuperbowserX wrote:Lemme elaborate more. So, in a redesign I have been... considering... I want to make it so that the only character portrait that shows on screen is that of the currently speaking character.
Now there are 2 positions the character can be on. The left side (usually the one the player character is in), or the right side.
Now in each scene, which character will appear at which side is going to change. So my idea is, at the start of each scene, I could update a list variable called "lefty" to include all the possible character images for who will want to be shown on the left side in that screen.
As for the say screen: it would then check if the character image being used is in the lefty list. If it is, show it on the left-hand side of the screen. If it isn't, show it on the right-hand side and horizontally flip the image.
I think you could accomplish only having the speaking character on screen with side image, you can adjust it's position. Not sure if that exactly what you wanted though.
So is the question ACTUALLY "how do I check if an image is showing based on a list"? To be clear, I have never thought of this and don't know the answer without giving it some more thought, but before doing so, it makes sense to know if that is actually what you are trying to do.
That said, given your explanation, I think it makes more sense to do this by character (rather than image). The say screen gets fed the character name by default, so if who in list_lefty seems like a much easier way of accomplishing what you're trying to do.