Pausing and Resuming an Animation using Animate?

Blitz3D Forums/Blitz3D Programming/Pausing and Resuming an Animation using Animate?

FlagDKT(Posted 2008) [#1]
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?


Naughty Alien(Posted 2008) [#2]
try to stop UpdateWorld at specific moment you want and your animation will be paused..well...as well as all other :)


FlagDKT(Posted 2008) [#3]
yes..as well as all others :D


Mortiis(Posted 2008) [#4]
Try the same Animate code(Same frames etc.) with 0 speed when you pause.


FlagDKT(Posted 2008) [#5]
The real problem is not pausing, but resuming at a certain frame without using Setanimtime command.


Mortiis(Posted 2008) [#6]
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.


FlagDKT(Posted 2008) [#7]
Cannot find it :(


IPete2(Posted 2008) [#8]
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.


FlagDKT(Posted 2008) [#9]
No. Unfortunately the frame is always variable :(
I think that the Animate command should have a starting frame...


Warner(Posted 2008) [#10]
Can't test it, but maybe you can enter a fractional frame number for SetAnimTime, such as SetAnimTime model, 3.5 ?


Ricky Smith(Posted 2008) [#11]
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.


IPete2(Posted 2008) [#12]
Ricky,

as always that is pure genious!

IPete2.