How to achieve a smooth transition between Live2D scenes in Ren'Py?

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
Wildly
Newbie
Posts: 7
Joined: Mon Sep 25, 2023 2:05 pm
Contact:

How to achieve a smooth transition between Live2D scenes in Ren'Py?

#1 Post by Wildly »

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:

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")
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

Post Reply

Who is online

Users browsing this forum: No registered users