How to slowly fade image in over the course of a scene?

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
jwong66
Newbie
Posts: 3
Joined: Fri Apr 16, 2021 7:23 am
Contact:

How to slowly fade image in over the course of a scene?

#1 Post by jwong66 »

Hi there,

I was wondering if anybody might know how to have an image slowly become visible over the course of a scene. I've got a character doing a lengthy monologue over a black screen, but I'd like the image of this character's face (already created) to gradually become more opaque until it's fully visible at the end. I'm assuming there's a way to do this without having to insert a hundred different JPEGs with one per cent more opaqueness for each line of dialogue.

Would appreciate any help!

Thanks!

User avatar
IrinaLazareva
Veteran
Posts: 399
Joined: Wed Jun 08, 2016 1:49 pm
Projects: Legacy
Organization: SunShI
Location: St.Petersburg, Russia
Contact:

Re: How to slowly fade image in over the course of a scene?

#2 Post by IrinaLazareva »

https://www.renpy.org/doc/html/atl.html

Code: Select all

image lucy = 'somesprite.png'

transform intro:
    align(.5,1.0)          #  position of image
    alpha .0      
    easein 10 alpha 1.0   # 10 (sec) is time of opaque
    
label start:
    show lucy at intro
    'some text'
    '....'

jwong66
Newbie
Posts: 3
Joined: Fri Apr 16, 2021 7:23 am
Contact:

Re: How to slowly fade image in over the course of a scene?

#3 Post by jwong66 »

IrinaLazareva wrote: Fri Apr 16, 2021 9:02 am https://www.renpy.org/doc/html/atl.html

Code: Select all

image lucy = 'somesprite.png'

transform intro:
    align(.5,1.0)          #  position of image
    alpha .0      
    easein 10 alpha 1.0   # 10 (sec) is time of opaque
    
label start:
    show lucy at intro
    'some text'
    '....'
Awesome, thanks!

Post Reply

Who is online

Users browsing this forum: No registered users