I am afraid there is no easy way to this is orx or am I missing something ? I have seen sausages twin animation post, and I think its possible but not as easy, just as setting SetCurrentAnimaFrame(...) or StartAnimFromFrame(...)
So, basically I am looking for a way to start an animation from a particular frame. Without messing with keyduration.Because not all frame should have same keyDuration.
This is handy because if you have some animations of common objects, like rotating coin animations, it seems odd if they all start from same frame.
Comments
Other than that, you should be able to do what you want with orxAnimPointer_SetTime() when your animation starts (by listening to the corresponding event for example).
For that I need to traverse through all the animation list and their key data. How do I do it ?
What is it you'd like to achieve by doing so? If you need to start an animation to a given frame, why don't you cut that animation into parts instead?
As for changing the animation speed, you can play with the Frequency attribute. Or link a clock to an object but in that case it won't affect only animations but everything (sound, dynamics, ...).
Other than this, I don't see much usage of slowing or speeding up only animations.
If one could manually change their animations frames to nextFrame() or previousFrame(), then slowing down or speeding up wont be difficult to achieve.
But I could access keyduration of animations from config, and if they have same keyduration, this would be then easier to do, right ? I have little idea on what things affect animations in orx.
But we already solved that issue in my first answer! You don't need to know which frames are played at which timestamp to do that.
All you have to do is called orxAnimPointer_SetTime() with a random value comprised between 0 and orxAnim_GetLength(). So basically:
It's actually even easier as you can simply call orxAnimPointer_SetFrequency() to change the actual speed.
Yes you can do that, it's a bit cumbersome though and my point is that for what you actually want to achieve you don't need those information at all.
One more thing, for example I have an animation with total duration of 1 sec, and it has 10 frames, so .1 for each, if I set .15 as start time, which frame would it play first ? at .1, 2nd frame would start, at .2 ,3rd frame would start. So, what about .15 ?