D
Dr PinkCake
Guest
Guest
I'm trying to achieve seamless movie transitions between three different sex animations in Ren'Py. The player should be able to speed up or slow down the animation.
Is there a simple way to achieve this?
At the moment I have created three anims with different speed and switch between them, but the switch doesn't necessarily happen at a synched up frame.
I couldn't find native support for changing playback speed in Ren'Py (that would be the simplest solution).
This is how it looks right now for me:
The functionality I want is there, but I had to resort to dissolve transitions as the frames didn't line up.
Here is my dummy code:
plus = plus button, minus = minus button, mid = speed indicator, invisible button = button for ending animation, covers gray anim area in image.
Is there a simple way to achieve this?
At the moment I have created three anims with different speed and switch between them, but the switch doesn't necessarily happen at a synched up frame.
I couldn't find native support for changing playback speed in Ren'Py (that would be the simplest solution).
This is how it looks right now for me:
The functionality I want is there, but I had to resort to dissolve transitions as the frames didn't line up.
Here is my dummy code:
plus = plus button, minus = minus button, mid = speed indicator, invisible button = button for ending animation, covers gray anim area in image.
Code:
image anim_slow = Movie(channel="anim_slow", play="images/anim_slow.webm")
image anim_mid = Movie(channel="anim_mid", play="images/anim_mid.webm")
image anim_fast = Movie(channel="anim_fast", play="images/anim_fast.webm")
label midAnim:
show anim_mid with dissolve
$ renpy.pause(0.1)
$ ui.imagebutton("plus", "plus", clicked=ui.returns("faster"), xpos=1850, ypos=885)
$ ui.imagebutton("minus", "minus", clicked=ui.returns("slower"), xpos=1850, ypos=1010)
$ ui.imagebutton("mid", "mid", clicked=ui.returns("mid"), xpos=1850, ypos=955)
hide anim_slow
hide anim_fast
$ ui.imagebutton("invisiblebutton", "invisiblebutton", clicked=ui.returns("done"), xpos=0, ypos=0)
$ result = ui.interact()
jump selectAnimSpeed
label fasterAnim:
show anim_fast with dissolve
$ renpy.pause(0.1)
$ ui.imagebutton("plus_off", "plus_off", clicked=ui.returns("faster"), xpos=1850, ypos=885)
$ ui.imagebutton("minus", "minus", clicked=ui.returns("mid"), xpos=1850, ypos=1010)
$ ui.imagebutton("fast", "fast", clicked=ui.returns("faster"), xpos=1850, ypos=955)
hide anim_mid
$ ui.imagebutton("invisiblebutton", "invisiblebutton", clicked=ui.returns("done"), xpos=0, ypos=0)
$ result = ui.interact()
jump selectAnimSpeed
label slowerAnim:
show anim_slow with dissolve
$ renpy.pause(0.1)
$ ui.imagebutton("plus", "plus", clicked=ui.returns("mid"), xpos=1850, ypos=885)
$ ui.imagebutton("minus_off", "minus_off", clicked=ui.returns("slower"), xpos=1850, ypos=1010)
$ ui.imagebutton("slow", "slow", clicked=ui.returns("slower"), xpos=1850, ypos=955)
hide anim_mid
$ ui.imagebutton("invisiblebutton", "invisiblebutton", clicked=ui.returns("done"), xpos=0, ypos=0)
$ result = ui.interact()
jump selectAnimSpeed
label selectAnimSpeed:
if result == "faster":
jump fasterAnim
elif result == "slower":
jump slowerAnim
elif result == "mid":
jump midAnim
else:
hide anim_fast
hide anim_slow
hide anim_mid
jump done
label done:
"DONE"