Pausing and Resuming an Animation using Animate?
Blitz3D Forums/Blitz3D Programming/Pausing and Resuming an Animation using Animate?
| ||
I need to pause and resume an animation sequence at a certain time. The problem is that I use Animate because Setanimtime doesn't do animation blend. Is there a way? |
| ||
try to stop UpdateWorld at specific moment you want and your animation will be paused..well...as well as all other :) |
| ||
yes..as well as all others :D |
| ||
Try the same Animate code(Same frames etc.) with 0 speed when you pause. |
| ||
The real problem is not pausing, but resuming at a certain frame without using Setanimtime command. |
| ||
I remember a thread about this a year ago maybe. Some guy asked the same thing and he was trying to simulate "freezing" the enemies with an ice bolt or some spell. You can try a forum search. |
| ||
Cannot find it :( |
| ||
FlagDKT, Do you know when the animation will pause? Is it always the same place? I would replace the animation sequence at the exact frame of animation where you need it to stop animating with a static mesh in that pose and same positions. Do this by showing the static mesh (with no animation in the correct pose, and hidientity the animating sequence). Hope that makes sense. Animation Frames 1,2,3,4,5,6,7,8,9,10,11,12,13,14 Static frame 14 (for the length that animation does not play) Then the animation seqeunce again using ShowEntity for the animating sequence It may not be the most elegant solution but it would possibly work IPete2. |
| ||
No. Unfortunately the frame is always variable :( I think that the Animate command should have a starting frame... |
| ||
Can't test it, but maybe you can enter a fractional frame number for SetAnimTime, such as SetAnimTime model, 3.5 ? |
| ||
What you could try is to dynamically create (extract) a new animation sequence from the starting frame (the pause frame) to the end of the original sequence when the animation is paused. mySequence=ExtractAnimSeq(model,AnimTime#(model),endframe) You can then play this animation as a one-shot sequence to resume the original paused animation sequence. Once this sequence has finished you can resume the original (looped) sequence. |
| ||
Ricky, as always that is pure genious! IPete2. |