Textbox and text transitions

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
ff80c38
Newbie
Posts: 1
Joined: Tue Mar 03, 2015 12:44 pm
Contact:

Textbox and text transitions

#1 Post by ff80c38 »

I only recently started working with Ren'Py and thought it should be easy to implement, but I can't figure out a good way to apply transitions on the textbox and the text in it.

I'd like to apply a simple Dissolve() on the textbox and the text in it at the same time as a Dissolve() on the scene is applied. So, if I'm starting with a completely black screen, I want to 'fadein' the scene and textbox at the same time. If I'm at the end of a scene, I want to 'fadeout' the scene, the textbox and the text in it (basically the whole screen) at the same time to a black screen.

Code: Select all

window show Dissolve(1.5)
scene image "images/BG/street.png"
with Dissolve(1.5)
This code gives me the transitions I want for a 'fadein', but not at the same time. I managed to find a workaround where I show my textbox as normal image, apply the transitions I want on it and switch it with my real textbox when the transition is over:

Code: Select all

scene image "images/BG/street.png"
show image "images/frame.png" at Position(ypos=640, xpos=0, yanchor=0, xanchor=0)
with Dissolve(1.5)

hide image "images/frame.png"
window show
I don't think it's pretty and it sadly only works for my 'fadein' problem, so I still have no real clue how to tackle my 'fadeout' problem.

Code: Select all

window hide Dissolve(1.5)
scene black
with Dissolve(1.5)
This code kind of works and has the transitions I want for my 'fadeout', but it's not at the same time and the text just disappears instead of being slowly dissolved.

User avatar
PyTom
Ren'Py Creator
Posts: 16088
Joined: Mon Feb 02, 2004 10:58 am
Completed: Moonlight Walks
Projects: Ren'Py
IRC Nick: renpytom
Github: renpytom
itch: renpytom
Location: Kings Park, NY
Contact:

Re: Textbox and text transitions

#2 Post by PyTom »

Generally, this isn't supported. Ren'Py lets you fade in the textbox, but not the text inside.
Supporting creators since 2004
(When was the last time you backed up your game?)
"Do good work." - Virgil Ivan "Gus" Grissom
Software > Drama • https://www.patreon.com/renpytom

Post Reply

Who is online

Users browsing this forum: GetOutOfMyLab