Tilengine - The 2D retro graphics engine forum
Change animation delay - Printable Version

+- Tilengine - The 2D retro graphics engine forum (http://tilengine.org/forum)
+-- Forum: English forums (http://tilengine.org/forum/forumdisplay.php?fid=3)
+--- Forum: Support (http://tilengine.org/forum/forumdisplay.php?fid=7)
+--- Thread: Change animation delay (/showthread.php?tid=483)



Change animation delay - mycats - 01-24-2020

Hi again!
TLN_SetAnimationDelay() is not working for me.

Code:
Code:
TLN_SetAnimationDelay(0,animdelay);

Sequence:
Code:
<sequence name="seq_walking" delay="12" loop="0" >
        6,7,8,9,10,11
</sequence>



RE: Change animation delay - megamarc - 01-28-2020

Hi!
You're right. It seems TLN_SetAnimationDelay() is an obsolete feature and should be removed (or updated).

Originally, an animation had a global delay that could be changed at runtime. But later I moved to a scheme where each frame has its own delay, that makes for more expressive animations, and the old global delay was left with no effect.

Maybe I should re-implement this function in a way that it changes the delays of all frames?


RE: Change animation delay - mycats - 03-12-2020

Any way to change animation delay / set TLN_SequenceFrame in loaded sequence?


RE: Change animation delay - megamarc - 03-14-2020

Not at this moment, once the sequence is created it stays this way.

You can create sequences at runtime in your source code with TLN_CreateSequence() , specifying an array of TLN_SequenceFrame structures, each one with its own delay. Maybe this is what you need?