Posted by semlar on Sat, 08 Jan 2011 12:31:11
I'm making a minigame that involves animating frames using the translation animation widget to drop them down the screen. Currently the frame moves down, gets to the bottom, plays another animation and gets reset back to the top.
When the player presses a key, I'd like the frame to stop where it is mid-animation (pause) and play a different animation at its current location.
Unfortunately, I can't figure out how to get the position of the frame. "GetOffset" just returns whatever "SetOffset" is set to, "GetTop" and "GetLeft" return the frame's original position, not where it is in the animation. The only thing I can think of is calculating its offset based on rate/time or manually animating the frame instead of using the widget.
Is there a way to just pause its active animation and play another one at its current location, or stop the animation and set the frame's position to wherever it was?
Posted by jnwhiteh on Sun, 09 Jan 2011 08:43:32
I believe that with the animation system there's no way to do what you want to do, other than manually calculating the 'position' of the frame at a given percentage through the animation. It's not the greatest solution, obviously =/.
Posted by semlar on Mon, 10 Jan 2011 05:42:50
Oh well. I'm kind of surprised the frame's properties don't update while it's being animated.
I'll probably end up just manually animating the frame, at least for the translation effect.
I appreciate your help with this.