SOLVED: Finish animation, start new one

Started by NickyNyce, Mon 12/12/2011 16:55:15

Previous topic - Next topic

NickyNyce

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

cat

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.

Khris

Yes, something like this:

Code: ags
  while (oObject.Frame != 0) {
    Wait(1);
  }

NickyNyce

#3
Thank you...ty

This will come in very handy.


Have a happy holiday everybody

SMF spam blocked by CleanTalk