How to achieve a smooth transition between Live2D scenes in Ren'Py?
Posted: Fri Nov 24, 2023 1:52 am
Greetings! I have a question about achieving a smooth transition between two Live2D scenes. Here's the scenario: I have two scenes with numbers, one counting from 1 to 3 and the other from 4 to 7. They are looped. I want to give the user the ability to switch scenes without interrupting the counting. For example, if the first scene is counting numbers from 1 to 3 and the player presses the button to switch to the second scene in the middle of the counting, scene_1 should wait until it counts to the last number (3) before smoothly transitioning to the next scene (scene_2).
I've tried this approach:
but it interrupts the counting. I'm scratching my head. Could you suggest a solution? Does Ren'Py have a status check for the current Live2D animation? Thank you
I've tried this approach:
Code: Select all
image live2d_animation = Live2D("live2d_model", loop=True, default_fade=0.0)
label default_live2d_animation:
window hide
show screen live2d_controller
$ renpy.pause(hard=True)
label scene_1_live2d_animation:
show live2d_animation scene1
$ renpy.pause(hard=True)
label scene_2_live2d_animation:
show live2d_animation scene2
$ renpy.pause(hard=True)
screen live2d_controller:
textbutton "Activate Animation 1":
xalign 0.8
yalign 0.7
action Jump ("scene_1_live2d_animation")
textbutton "Activate Animation 2":
xalign 0.8
yalign 0.5
action Jump ("scene_2_live2d_animation")