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.
I was searching for way to define a transform code that will show sprite at certain position with a dissolve-ish transition, i have four of them at the moment
transform myleft:
xalign 0.12 yalign 1.0
on show:
alpha 0.0
linear 0.3 alpha 1.0
on hide:
alpha 1.0
linear 0.3 alpha 0.0
on replace:
alpha 0.0
linear 0.3 alpha 1.0
on replaced:
alpha 1.0
linear 0.3 alpha 0.0
transform myleft2:
xalign 0.3 yalign 1.0
on show:
alpha 0.0
linear 0.3 alpha 1.0
on hide:
alpha 1.0
linear 0.3 alpha 0.0
on replace:
alpha 0.0
linear 0.3 alpha 1.0
on replaced:
alpha 1.0
linear 0.3 alpha 0.0
transform myright:
xalign 0.7 yalign 1.0
on show:
alpha 0.0
linear 0.3 alpha 1.0
on hide:
alpha 1.0
linear 0.3 alpha 0.0
on replace:
alpha 0.0
linear 0.3 alpha 1.0
on replaced:
alpha 1.0
linear 0.3 alpha 0.0
transform myright2:
xalign 0.9 yalign 1.0
on show:
alpha 0.0
linear 0.3 alpha 1.0
on hide:
alpha 1.0
linear 0.3 alpha 0.0
on replace:
alpha 0.0
linear 0.3 alpha 1.0
on replaced:
alpha 1.0
linear 0.3 alpha 0.0
And it mostly works out just fine, but sometimes is lags into something like this when sprites are changing:
I'm not too sure what problem the image is supposed to be portraying. I think you're referring to the girl being all white with red lines instead of her actual color-containing sprite, but I can't really be sure as I do not know what the intended result looks like. Is this white sprite like a part of the transition or a corruption of the image file when running it through Renpy?
I'm sorry I can't help, I don't really understand the root of the problem. And maybe you're not even referring to the white girl. If you are not and that's the actual coloring of the girl, I do apologise. I did not mean to insult your art.
Or are you talking about one character overlapping another during the transition?(The girl's book overlapping the other girl during the dissolve animation?) In that case, you could try to add the zorder statement to your code.
Nope, the problem is with the white girl, instead of just dissolving into another of her sprites it brights up for a few solid seconds before disappearing.
I wouldn't really know a good way around that problem, or what the problem would be exactly. You said the transitions work the way they should most of the time, maybe you made a typo or small coding mistake with this particular dissolve statement in the text itself instead of something within the transformation defining? Could you show me the coding of this particular image?
show sco 3b at myright
sco "Вы новая ученица, и вы обязаны были присутствовать на церемонии поступления."
show sco 3a
extend " Почему вас не было?"
I put sprite 3a (which is the one that lags) without any transforms because the only difference between sco3b and sco3a is opened/closed mouth, so i needed an instant change without dissolve
Still don't understand why it brights up though