Changing animation speed while animating [SOLVED]

Started by Elessar, Wed 26/03/2008 23:52:08

Previous topic - Next topic

Elessar

Is it possible to change the speed of an animation while that animation is running? Given the circumstances, I can't change it by altering the game's speed.  It seems like there should be a really simple answer, but I can't find one.

BOYD1981

one workaround i can think of is to clone the animation using different views and different frame delays and just have the character (or object) switch it's view to one of the faster animations.

Limey Lizard, Waste Wizard!
01101101011000010110010001100101001000000111100101101111011101010010000001101100011011110110111101101011

Elessar

I don't think that will help. Right now, I can start the animation over with a new speed, but doing so starts from the first frame, and thus is jerky. The same would happen if I switched to an identical but faster animation. I would like to be able to speed up the animation without a noticeable change in frames.

miguel

In V2.72, in the view pane, there's a clickbox you can check that allows the animation to continue to the next loop. There is no delay doing that and it can work for you if you structure your views acording and in advance.
I don't know about V3.0 because I haven't use it yet.
Hope it helps :)
Working on a RON game!!!!!

TwinMoon

#4
Quote from: Elessar on Wed 26/03/2008 23:52:08
It seems like there should be a really simple answer, but I can't find one.

There isn't a simple answer ;)


You could check if it's in the right place by using object[n].Frame. If you change the view when the animation is on the last frame is shouldn't be jerky.

Elessar

Quote from: TwinMoon on Thu 27/03/2008 16:08:21
Quote from: Elessar on Wed 26/03/2008 23:52:08
It seems like there should be a really simple answer, but I can't find one.

There isn't a simple answer ;)


You could check if it's in the right place by using object[n].Frame. If you change the view when the animation is on the last frame is shouldn't be jerky.

That's fairly simple in my opinion. I'll give it a shot. ;)

TwinMoon

Well, not really really simple. I don't know how experienced a programmer you are. The title says its solved?

Elessar

Quote from: TwinMoon on Sat 29/03/2008 18:08:01Well, not really really simple. I don't know how experienced a programmer you are.
Well, I'm taking a comp. sci. degree, so I'm fairly experinced at programming, just not AGS.

Quote from: TwinMoon on Sat 29/03/2008 18:08:01The title says its solved?
Yes, that solved the problem. I did a simple while loop that didn't exit until the animation reached the first frame of the first loop.

Code: ags

object[1].Animate(0, 7, eRepeat, eNoBlock);
...
//more code
...
while ((object[1].Frame != 0) && (object[1].Loop != 0)){
   Wait(1);
}
object[1].Animate(0, 6, eRepeat, eNoBlock );


I could probably increase the amount of time the game waits in each loop, but the instance is near the end of a rather long cutscene, and I don't like having to wait through it each time. :P

TwinMoon

Great it's solved! And I helped a better programmer; that'll boost my ego ;)

P.S.:
Quote from: Elessar on Sun 30/03/2008 23:28:49
I could probably increase the amount of time the game waits in each loop, but the instance is near the end of a rather long cutscene, and I don't like having to wait through it each time. :P

May I introduce you to one of the greatest of all commands: StartCutscene!

Elessar

Quote from: TwinMoon on Mon 31/03/2008 00:41:12P.S.:
Quote from: Elessar on Sun 30/03/2008 23:28:49
I could probably increase the amount of time the game waits in each loop, but the instance is near the end of a rather long cutscene, and I don't like having to wait through it each time. :P

May I introduce you to one of the greatest of all commands: StartCutscene!

I was thinking that StartCutscene() wouldn't help, as it's already inside a cutscene, which is coordinated to the music of a long track. But as I can use SeekMP3PosMillis (int position), I think that might work. Thanks for the tip! 8)

SMF spam blocked by CleanTalk