hey,
I was just wondering, if there is a easy way to start and animation at a random frame rather then always on the first frame?
I have a rather long animation that will be applied to several objects on the screen. it looks a bit stupid when they are all in sync.
so if there is a easy way to achieve that, that would be great.
otherwise I will split up this one animation into multiple animations and somehow randomize between those.
Tobi
Comments
If it's only to avoid some sync issues, that should work. If you need more precise control, I'll have to think about it as we don't expose the anim frames themselve for now. I can add that in the new anim system on which I'm currently working though, let me know.
thank you
I was just starting the animation at a random value that also could be greater then the length of the animation.
orx resolves this nicely. however there will be some hiccups directly after starting the game.
I just set the maximum random value to something rather small, then everything works fine. Though, it would be nicer not to have some magic number in the code
The annoying step is to actually get the anim you want. You have to query the orxANIMSET for that.
Usually you have an orxANIMPOINTER on your orxOBJECT, you can then retrieve the orxANIMSET from it.
From the orxANIMSET, you can get the orxANIM using its handle, given by the orxANIMPOINTER with GetCurrent/TargetAnimHandle.
It's a bit convoluted. I'll try to add more accessors in the new anim system.