Image transition with text

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
Skyleft
Regular
Posts: 29
Joined: Wed Feb 11, 2015 4:52 pm
Contact:

Image transition with text

#1 Post by Skyleft »

I want to do a transition with two images, but while the transition is happening (it would be a long one) I'd like to put text in the middle.
Is that possible?

User avatar
Donmai
Eileen-Class Veteran
Posts: 1960
Joined: Sun Jun 10, 2012 1:45 am
Completed: Toire No Hanako, Li'l Red [NaNoRenO 2013], The One in LOVE [NaNoRenO 2014], Running Blade [NaNoRenO 2016], The Other Question, To The Girl With Sunflowers
Projects: Slumberland
Location: Brazil
Contact:

Re: Image transition with text

#2 Post by Donmai »

Yes, it can be done and in many ways. I don't know if that's what you want, but that's how I would do it :) :
- For the text, I would use the centered character

Code: Select all

init:
    define centered = Character(None, what_style="centered_text", window_style="centered_window")
- Then I would define the first image:

Code: Select all

image one = "one.jpg"
- The second image would be defined as an ATL block:

Code: Select all

image two:
    "two.jpg"
    alpha 0.0
    pause 5.0                      #will wait n seconds before appearing, you may adjust this time
    linear 20.0 alpha 1.0          # will slowly appear taking n seconds
Then let's call the scene (and see if it works :) ):

Code: Select all

scene one
show two
centered "Blah blah blah blahv blah blahv blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blahvv blahv blah blah blah blah blah blah blah."
You don't need to use the 'centered' character. If you use other character for the text, your dialogue box will appear over the image transition.
Image
No, sorry! You must be mistaking me for someone else.
TOIRE NO HANAKO (A Story About Fear)

Skyleft
Regular
Posts: 29
Joined: Wed Feb 11, 2015 4:52 pm
Contact:

Re: Image transition with text

#3 Post by Skyleft »

This almost works, but when the second image is going to appear, the first one disappears instantly and the second one appears from nowhere

User avatar
Donmai
Eileen-Class Veteran
Posts: 1960
Joined: Sun Jun 10, 2012 1:45 am
Completed: Toire No Hanako, Li'l Red [NaNoRenO 2013], The One in LOVE [NaNoRenO 2014], Running Blade [NaNoRenO 2016], The Other Question, To The Girl With Sunflowers
Projects: Slumberland
Location: Brazil
Contact:

Re: Image transition with text

#4 Post by Donmai »

I did a test before posting, and it worked for me.
Image
No, sorry! You must be mistaking me for someone else.
TOIRE NO HANAKO (A Story About Fear)

Post Reply

Who is online

Users browsing this forum: Google [Bot], Pandar, Semrush [Bot]