Dialogue window transform, how to apply only on "window show"?

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
oatnoodles
Regular
Posts: 71
Joined: Tue Aug 03, 2021 6:26 pm
Projects: Samuda Interval
Organization: Tomuwa Entertainment
Deviantart: oatnoodles
Github: oatnoodles
itch: oatnoodles
Discord: oatnoodles
Contact:

Dialogue window transform, how to apply only on "window show"?

#1 Post by oatnoodles »

I have a transform assigned to my dialogue window. When the transform runs, it'll work every time a new line of dialogue appears. I want the transform to only apply on the first line of dialogue and the last, not the ones between. Here's an example of what I'm looking for. Using "on show" makes it so the transform plays with every new line of dialogue, instead of only on the first (and last.)

My current code is this:

Code: Select all

transform WindowEaseBottom:
        on show:
            alpha 0.0
            parallel:
                linear 0.5 alpha 1.0
            parallel:
                xalign 0.5 yalign 1.0
                linear 0.5 yoffset -10
        on hide:
            alpha 1.0
            parallel:
                xalign 0.5 yalign 1.0
                linear 0.5 yalign 0.0
            parallel:
                linear 0.5 alpha 0.0
I'd also like to make it so when the dialogue box is hidden/the dialogue has ended, it goes down. Currently it basically just does the same thing as on show.

Post Reply

Who is online

Users browsing this forum: Bing [Bot], Starberries, umbrores