Tilengine - The 2D retro graphics engine forum

Full Version: Change animation delay
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
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>
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?
Any way to change animation delay / set TLN_SequenceFrame in loaded sequence?
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?