Discuss how to use the Ren'Py engine to create visual novels and story-based games. New releases are announced in this section.
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.
- Posts: 11
- Joined: Wed Dec 26, 2018 10:45 am
I'm coming across some unexpected behavior with LayeredImage that I'm not sure how to handle. I want to be able to use a Layered Image at varying opacity levels (this is basically being used to apply a tan effect on a customizable character).
The problem I'm running into, is that the different layers aren't showing up at the same opacity.
Here's a quick sample. The LayeredImage itself:
Code: Select all
layeredimage mirror_face_1_tan makeup:
if pc_lip_size_class == 3:
elif pc_lip_size_class == 2:
## Tan Makeup
if pc_makeup and pc_lip_size_class == 3:
elif pc_makeup and pc_lip_size_class == 2:
This is the code displaying the image, and switching the variable that calls for a different layer.
Code: Select all
$ pc_makeup = False
show mirror_face_1_tan makeup at wincenter2:
"Click to add make-up."
$ pc_makeup = True
I've gotten the same outcome even if I hide the image and show it again. The layers don't share the same opacity level. Samples of the display before changing the pc_makeup variable and after:
Anyone know why this is happening and how I can get the behavior I want out of this? Thanks!
- Posts: 26
- Joined: Sun May 14, 2017 6:57 pm
I've had this same issue recently as well and had to scrap it because of this very same issue. I never tested this method out but I wonder if you put it as an init -1 if that might change anything. Though I know next to nothing about programming.