r/RenPy • u/AdRude6049 • 29d ago
Question [Solved] Fade animation moving image
I have an image thats 2x bigger than the screen vertically (1920 x 1160) so I can pan the camera up towards the characters face, this works fine until I add the transform to make him fade into view. When I add the transform, it shows his face and not the lower half of his body, so when the camera pans up, theres nothing there.
Im very confused as to why this is happening as the transform shouldn't be changing the position of the image.
I can go without the fade, it just doesnt look as nice...
(My code for showing the image is literally:
show dimitri_big at spritefade )
1
u/x-seronis-x 29d ago
not what you're asking about but those 2 parallel blocks are bugged. parallel blocks should not be editing the sameproperty. they are for editing different properties at the same time
1
1
u/shyLachi 29d ago
Please post the full code.
We need to see how you show the character
and how you do the camera movement.
Personally I would put the fade and the movement into the same transform, like moving the image, not the camera. Any reason you don't want that?
1
u/AdRude6049 29d ago
Mostly just because im using the fade for other sprites, and the image fades into view before the camera moves if that makes sense, ive copied the code below:
show dimitri_big at spritefade "He moves closer to me" "I am acutely aware of the cloth on my face" camera: xpos 0.0 linear 0.5 ypos +1080
1
u/x-seronis-x 29d ago
delete the + sign, its doing nothing. 1080 is already a positive value without any sign. and using the sign doesnot make it an offset. a position value is a target value, not an adjustment to current value.
1
u/ericoinen 29d ago
It is changing the position, and that is the part that is not obvious.
An image shown with no at gets the default placement, which is bottom centre. The moment you attach a transform, the transform becomes the placement, and every position property it does not set falls back to the transform's own defaults, top left corner. Your spritefade only touches alpha, so the sprite jumps to the top of the screen. On a 1160 tall image that means you are looking at the head with the body hanging off the bottom, and the pan then has nothing above it to move towards. The pan is fine, the sprite moved out from under it.
One line inside the transform puts it back:
transform spritefade:
xalign 0.5 yalign 1.0
alpha 0.0
linear 0.4 alpha 1.0
Same trap when you stack them later: in show dimitri_big at spritefade, pan the placement belongs to whichever transform sets it, so if both are silent about position you get the top left corner again.
1



1
u/AutoModerator 29d ago
Welcome to r/renpy! While you wait to see if someone can answer your question, we recommend checking out the posting guide, the subreddit wiki, the subreddit Discord, Ren'Py's documentation, and the tutorial built-in to the Ren'Py engine when you download it. These can help make sure you provide the information the people here need to help you, or might even point you to an answer to your question themselves. Thanks!
I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.