I'm having trouble getting a dissolve effect when changing between two images that are part of a screen.
The game I am working on has a complex user interface with an image of the heroine in the center. Depending on the chosen action, I'd like to switch the "layered image" parameters to show different clothing states or states with different ATL animations.
It's possible to get the effect I want in a normal "renpy dialog" as follows:
But I haven't not found a way to do a dissolve or crossfade between "states" when the layered image displayable is "add"ed to a Screen.
Here's some sample code that demonstrates what I am trying to achieve, it should work in any Renpy 8.2+ project environment (uses CycleVariable so need 8.2+):
The game I am working on has a complex user interface with an image of the heroine in the center. Depending on the chosen action, I'd like to switch the "layered image" parameters to show different clothing states or states with different ATL animations.
It's possible to get the effect I want in a normal "renpy dialog" as follows:
Code:
label layered_image_demo:
scene black
show heroine with Dissolve(1.0)
"take off the top"
show heroine notop with Dissolve(0.5)
"touch the weiner"
show heroine notop hj with Dissolve(0.5)
"play hj animation"
show heroine notop hjanim with Dissolve(0.2)
pause 3.0
show heroine notop hj with Dissolve(0.2)
"finished"
hide heroine with Dissolve(1.0)
return
Here's some sample code that demonstrates what I am trying to achieve, it should work in any Renpy 8.2+ project environment (uses CycleVariable so need 8.2+):
Code:
label start:
scene black
call screen screen_example()
# using placeholders instead of images for this example
image image_one = Solid("#A22", xsize=100, ysize=100)
image image_two = Solid("#777", xsize=100, ysize=100)
default test_image_ref = "image_one"
screen screen_example():
vbox:
at truecenter
spacing 50
text "Screen add displayable crossfade test"
### I want to have a dissolve transition (or crossfade transform?) applied to just this image when the source displayable
add test_image_ref
textbutton "switch image":
action CycleVariable("test_image_ref", ["image_one", "image_two"])
textbutton "Quit":
action Return(True)