greets fellow blenderheads:
I’m trying to switch between two animations that run in slow and fast modes respectively (it’s essentially the same animation but in runs in a slow mode, over 800 frames and in fast mode in 80 frames).
Each animation has been setup in its own scene (see attached file).
To run the animation just press the fast button (red one). Once the other scene loads then it’s possible to switch between the two animations.
Pressing the spacebar also pauses the animation when in the slow scene.
I have run into a few problems and I’m not sure how to proceed. Heck, I’m not even sure I’m on the right path. Long story short:
#1. Seameless transition between the two modes. Is it possible in the BGE?
As it stands, the scene loads with the animation set to the first frame, then loads the stored value (if any) from a dictionary and continues from there. The current implementation is not elegant. Is there a more efficient way of achieving this?
#2. Assuming that you’ve swithced between fast and slow modes a couple of times, if you press spacebar the slow scene then the animation freezes as it toggles a property (PLAY). Pressing it again, however, restarts the animation but not from the desired frame. How do I proceed from here? Do I need to set up different functions?
#3. How am I supposed use the API documentation on this page:
https://docs.blender.org/api/blender_python_api_2_78a_release/bge.types.BL_ActionActuator.html#bge.types.BL_ActionActuator
I’ve tried to use some of the function arguments (e.g. frame, useContinue) but got errors ("‘frame’ is an invalid keyword argument for this function"). How am I supposed to use such methods from bge Python?
Any suggestions or recommendations are welcome.
Attachments
animationQuesttion.blend (980 KB)