Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: NickyNyce on Mon 12/12/2011 16:55:15

Title: SOLVED: Finish animation, start new one
Post by: NickyNyce on Mon 12/12/2011 16:55:15
Hey guys,

I currently have an object that is animating in the background, it's a nine frame view and is (non-blocking). When the character interacts with it, I would like the object to finish running the animation and then have a second animation view of the object start. When the 2nd animation ends, the transition back to the first is nice and smooth because both animations end and start the same way.

But...

When I interact with the animating object, the animation doesn't finish, it cuts to the 2nd animation instantly. Can someone help me out here with how to have the animation finish before starting the 2nd. I have tried to hunt this down, but am having a bit of trouble finding what I'm looking for.

Thanks in advance
Title: Re: Finish animation, start new one
Post by: cat on Mon 12/12/2011 17:06:58
I currently don't have the helpfile here, but I think you can check the current frame of the animation somehow. So you could wait until the correct frame and then start the new animation.
Title: Re: Finish animation, start new one
Post by: Khris on Mon 12/12/2011 17:12:31
Yes, something like this:

  while (oObject.Frame != 0) {
    Wait(1);
  }
Title: Re: Finish animation, start new one
Post by: NickyNyce on Mon 12/12/2011 17:23:51
Thank you...ty

This will come in very handy.


Have a happy holiday everybody