Adventure Game Studio

AGS Support => Advanced Technical Forum => Topic started by: tweety on Tue 20/07/2004 13:23:47

Title: how to animate characters and object in sync?
Post by: tweety on Tue 20/07/2004 13:23:47
I am trying to program this little scene: my player character stands under a bird's nest (object) with a bird in it (character) and pokes that nest with a stick. Everytime the stick hits the nest, the nest and the bird should jump a little bit.
I tried to do that by creating animations for the two characters and the nest and started those three animations at the same time. but somehow it isn't in sync, although I calculated the time for all three animations so that they should be in sync. So my question: If in my script I start three animations at the same time, will they play at the same time, or one after another?
Or is there another (and better) way to do this?
thanks in advance
Title: Re: how to animate characters and object in sync?
Post by: Radiant on Tue 20/07/2004 17:25:11
They will play simultaneously IF you use non-blocking animations.
You should give three non-blocking anims, then do something like
  while (IsObjectAnimating (1)) Wait (1);
Note that characters may behave out of sync with objects, if 'anti-glide mode' is enabled.
Title: Re: how to animate characters and object in sync?
Post by: tweety on Tue 20/07/2004 17:55:28
okay, thanks for that information.

it works now, but I'm not sure why... I had to change different things in that room that in my opinion had nothing to do with it - and now the animations are okay...  ???
anyway, I'm happy that it works at last...