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.
looking at what you are doing...where you want to layer images on top of each other...you should just use a layered image. That is what they are there for!
A Close Shave:
*Last Thing Done (Aug 17): Finished coding emotions and camera for 4/10 main labels.
*Currently Doing: Coding of emotions and camera for the labels--On 5/10
*First Next thing to do: Code in all CG and special animation stuff
*Next Next thing to do: Set up film animation
*Other Thing to Do: Do SFX and Score (maybe think about eye blinks?)
trooper6 wrote: ↑Mon Dec 24, 2018 1:41 pm
looking at what you are doing...where you want to layer images on top of each other...you should just use a layered image. That is what they are there for!
Hi there trooper, yeah you're right, but it's something new and I'm still trying to figure out how it works exactly...
Maybe you'd be able to help me. For example:
Try this:
Rename your base, outfit, hair and face files to something like for example (will allow for automatic image attributes):
chara_base.png
chara_outfit_casual.png <- replace "casual" with the name of outfit
chara_hair_normal.png <- replace "normal" with name of hairstyle
chara_face_neutral.png <- ditto
layeredimage chara:
always "chara_base" # don't add extension
group outfit auto # auto define any outfits you have, in this example it will find "chara_outfit_casual"
group hair auto # auto define any hairstyles you have
group face auto # ditto
That's probably as simple as it gets (the "if" statement seemingly doesn't allow more than 1 displayable). I hope that meets your needs!
thebackup wrote: ↑Mon Dec 24, 2018 7:11 pm
Try this:
Rename your base, outfit, hair and face files to something like for example (will allow for automatic image attributes):
chara_base.png
chara_outfit_casual.png <- replace "casual" with the name of outfit
chara_hair_normal.png <- replace "normal" with name of hairstyle
chara_face_neutral.png <- ditto
layeredimage chara:
always "chara_base" # don't add extension
group outfit auto # auto define any outfits you have, in this example it will find "chara_outfit_casual"
group hair auto # auto define any hairstyles you have
group face auto # ditto
That's probably as simple as it gets (the "if" statement seemingly doesn't allow more than 1 displayable). I hope that meets your needs!
Thank you thebackup,
It ended up being too difficult to make work, so I've just added mirrored pngs (shame on me I know), but I'll try again tomorrow!
Merry Christmas and thank you all for your help!
trooper6 wrote: ↑Mon Dec 24, 2018 1:41 pm
looking at what you are doing...where you want to layer images on top of each other...you should just use a layered image. That is what they are there for!
Hi there trooper, yeah you're right, but it's something new and I'm still trying to figure out how it works exactly...
Maybe you'd be able to help me. For example:
if activeCharacter == 1:
"outfit1.png"
"hair.png"
"face.png"
But that returns an error.
For me to help, I need to understand a bit more about how your images are put together.
You have a character that has a base model.
If activeCharacter is 1, then she has outfit #1, and she has hair and and a face. What happens if active character isn't 1? Then the character has no face and no hair? She has not outfit? I thought the only difference you were dealing with was if the character had a baseball cap on or not.
What are the layers you plan on having? What variations are you dealing with?
Can you explain your image layers a bit more?
A Close Shave:
*Last Thing Done (Aug 17): Finished coding emotions and camera for 4/10 main labels.
*Currently Doing: Coding of emotions and camera for the labels--On 5/10
*First Next thing to do: Code in all CG and special animation stuff
*Next Next thing to do: Set up film animation
*Other Thing to Do: Do SFX and Score (maybe think about eye blinks?)
Hey there trooper6, sorry for the late reply.
Okay, so it's actually part of a much larger thing I'm putting together.
I'm hoping to create a dungeon crawler that the player can move through.
First I need a random background.
Then the random background will figure out what props will be located in the room.
Then your character is loaded. You can play 1 of 3 characters, all with the same base body.
You navigate through the room by clicking on cover, for which I'm using imagebuttons (click on the crate and your character jumps there.)
So far it's going relatively well, but I am struggling with some things. For example, for a character to move from point A to point B, I'd like an animation to play.
However, animations are done as an image, and thus show up 'underneath' the screens (I'm unaware of any ways to have movies play on top of screens).
I didn't want to use layered images because you can't have more than one image per if statement. It's complicated and I know I'm in way over my head, but I feel like I should push myself to get this to work somehow.
The entire point of layered images is NOT using conditionals. You're supposed to name the files with the relevant attributes and use the attributes (not conditions) to control the image. That said, it's perfectly fine to simply use ConditionSwitches or other methods if that is easier for you to understand/implement.
The actual answer to your question is simply xzoom -1 (as demonstrated above). The white in the image you added is probably just the frame background, not the image -- xzoom -1 does not inherently change the image in any way other than flipping it. You can also apply xzoom -1 to any individual element rather than the container (i.e., you could simply write add "bob_hat.png" at flip).