layeredimage with dissolve

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
Exiscoming
Regular
Posts: 132
Joined: Tue Apr 29, 2014 5:37 pm
Contact:

layeredimage with dissolve

#1 Post by Exiscoming »

So I'm making the transition from screen to layeredimage for my character models, but I just noticed something.
In the past I could do something like this.

Code: Select all

screen bob:
	add "bobBody.png"
	if bobFace == 1:
		add "bobface1.png"
	if bobFace == 2:
		add "bobface2.png"

label start:
	bob "Hello."
	$ bobFace = 2
	with Dissolve(0.4)
	bob "Goodbye."
Which would change the facial expression with dissolve over 0.4 seconds.
Now when I try doing it with a layeredimage instead, it instantly changes without dissolve.

Code: Select all

layeredimage bob:
	always:
		"bobBody.png"
	if bobFace == 1:
		"bobface1.png"
	if bobFace == 2:
		"bobface2.png"
		
label start:
	bob "Hello."
	$ bobFace = 2
	with Dissolve(0.4)
	bob "Goodbye."
Is there a way to have dissolve when using a layeredimage?

strayerror
Regular
Posts: 159
Joined: Fri Jan 04, 2019 3:44 pm
Contact:

Re: layeredimage with dissolve

#2 Post by strayerror »

I think you're meant to use it more like this, but haven't had a chance to test it:

Code: Select all

layeredimage bob:
	always:
		"bobBody.png"
	group face:
		attribute face1 default "bobface1.png"
		attribute face2 "bobface2.png"

label start:
	bob "Hello."
	show bob face2 with Dissolve(0.4)
	bob "Goodbye."

Post Reply

Who is online

Users browsing this forum: babayi0827, Bing [Bot], PyTom, Semrush [Bot]