ATL transform issue

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.
Post Reply
Message
Author
User avatar
tomotomo
Regular
Posts: 32
Joined: Thu May 28, 2015 2:01 pm
Tumblr: tomatomagica
Location: Russia
Contact:

ATL transform issue

#1 Post by tomotomo »

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

Code: Select all

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:
Image

User avatar
Mammon
Miko-Class Veteran
Posts: 712
Joined: Sat Nov 07, 2015 3:09 pm
Completed: Pervert&Yandere, Stalker&Yandere
Projects: Roses Of The Thorn Prince
Contact:

Re: ATL transform issue

#2 Post by Mammon »

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.

Code: Select all

show girl_with_book at myright2
show white_girl with dissolve at myright1 zorder 2
This way, the white girl should not be overlapped by the girl with book at all times, including the transition. (Probably).
ImageImageImage

Want some CC sprites?

User avatar
tomotomo
Regular
Posts: 32
Joined: Thu May 28, 2015 2:01 pm
Tumblr: tomatomagica
Location: Russia
Contact:

Re: ATL transform issue

#3 Post by tomotomo »

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.

User avatar
Mammon
Miko-Class Veteran
Posts: 712
Joined: Sat Nov 07, 2015 3:09 pm
Completed: Pervert&Yandere, Stalker&Yandere
Projects: Roses Of The Thorn Prince
Contact:

Re: ATL transform issue

#4 Post by Mammon »

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?
ImageImageImage

Want some CC sprites?

User avatar
tomotomo
Regular
Posts: 32
Joined: Thu May 28, 2015 2:01 pm
Tumblr: tomatomagica
Location: Russia
Contact:

Re: ATL transform issue

#5 Post by tomotomo »

I think i figured at least one reason why this happened

Code: Select all

    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

User avatar
Kia
Eileen-Class Veteran
Posts: 1040
Joined: Fri Aug 01, 2014 7:49 am
Deviantart: KiaAzad
Discord: Kia#6810
Contact:

Re: ATL transform issue

#6 Post by Kia »

I guess it's because you have a value way higher than 1.0 for alpha somewhere, like putting 9.0 instead of 0.9 by mistake (or 10 instead of 1.0)

Post Reply

Who is online

Users browsing this forum: Alex, Majestic-12 [Bot], piinkpuddiin