Each image inside image statement should dissolve in and dissolve out [Solved]

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
Yuvan raj
Regular
Posts: 38
Joined: Wed Feb 17, 2021 11:24 am
Contact:

Each image inside image statement should dissolve in and dissolve out [Solved]

#1 Post by Yuvan raj »

Hello wonderful people, I'm using image statement to cycle through few images and I want each of those images to dissolve in and dissolve out. I'm using it in main menu screen. Below is my code.

Code: Select all

init:
    transform basic_fade:
        on show:
            alpha 0.0
            linear 1.0 alpha 1.0
        on hide:
            linear 1.0 alpha 0.0

image fire_effect:
	"fire_1.png" with basic_fade
	pause 0.5
	"fire_2.png" with basic_fade
	pause 0.5
	"fire_3.png" with basic_fade
	pause 0.5
	repeat
	
add "fire_effect"	
I have tried using 'at basic_fade' instead of 'with basic_face' too. And I also tried several variations of the above code. If any of you guys would kindly help me that would be appreciated. Thank you
Last edited by Yuvan raj on Wed Nov 16, 2022 10:57 am, edited 1 time in total.

User avatar
_ticlock_
Miko-Class Veteran
Posts: 910
Joined: Mon Oct 26, 2020 5:41 pm
Contact:

Re: Each image inside image statement should dissolve in and dissolve out

#2 Post by _ticlock_ »

Yuvan raj wrote: Fri Nov 11, 2022 9:32 am
You can just use transition Dissolve:

Code: Select all

image fire_effect:
	"fire_1.png" with Dissolve(0.5)
	0.5
	"fire_2.png" with Dissolve(0.5)
	0.5
	"fire_3.png" with Dissolve(0.5)
	0.5
	repeat

Yuvan raj
Regular
Posts: 38
Joined: Wed Feb 17, 2021 11:24 am
Contact:

Re: Each image inside image statement should dissolve in and dissolve out

#3 Post by Yuvan raj »

_ticlock_ wrote: Fri Nov 11, 2022 10:30 am
Yuvan raj wrote: Fri Nov 11, 2022 9:32 am
You can just use transition Dissolve:

Code: Select all

image fire_effect:
	"fire_1.png" with Dissolve(0.5)
	0.5
	"fire_2.png" with Dissolve(0.5)
	0.5
	"fire_3.png" with Dissolve(0.5)
	0.5
	repeat

Thank you! I had a faint memory of using 'with dissolve' for 'show' and 'hide' inside the script so made a dumb mistake. I just increased the pause time to dissolve out the first pic fully then make the second pic dissolve in. Again, thank you for your help!

Post Reply

Who is online

Users browsing this forum: Google [Bot], Vamp-sama