ModEnc is currently in Maintenance Mode: Changes could occur at any given moment, without advance warning.

Animation Looping: Difference between revisions

From ModEnc
Jump to navigation Jump to search
Nighthawk200 (talk | contribs)
mNo edit summary
m Replacing Template:TTL with Template:F.
Line 1: Line 1:
The animation looping control code is pretty confusing. The loop control allows to set start/end frames for the first iteration of the loop, and start/end frames for all other iterations together.
The animation looping control code is pretty confusing. The loop control allows to set start/end frames for the first iteration of the loop, and start/end frames for all other iterations together.


* {{TTL|Start}} defines a ''0-based'' index of the first frame to play on the first iteration.
* {{f|Start|link}} defines a ''0-based'' index of the first frame to play on the first iteration.
* {{TTL|End}} defines the amount of frames to play on the first iteration.
* {{f|End|link}} defines the amount of frames to play on the first iteration.
* {{TTL|LoopStart}} defines a ''0-based'' index of the first frame for all following iterations.
* {{f|LoopStart|link}} defines a ''0-based'' index of the first frame for all following iterations.
* {{TTL|LoopEnd}} defines a '''''1'''-based'' index of the last frame for all but the first iterations. The first iteration will never play frames beyond this one, even if {{Tt|End}} is set to do so.
* {{f|LoopEnd|link}} defines a '''''1'''-based'' index of the last frame for all but the first iterations. The first iteration will never play frames beyond this one, even if {{Tt|End}} is set to do so.
* {{TTL|LoopCount}} defines the total amount of iterations to play.
* {{f|LoopCount|link}} defines the total amount of iterations to play.


==== Example ====
==== Example ====

Revision as of 07:24, 27 November 2009

The animation looping control code is pretty confusing. The loop control allows to set start/end frames for the first iteration of the loop, and start/end frames for all other iterations together.

  • Start defines a 0-based index of the first frame to play on the first iteration.
  • End defines the amount of frames to play on the first iteration.
  • LoopStart defines a 0-based index of the first frame for all following iterations.
  • LoopEnd defines a 1-based index of the last frame for all but the first iterations. The first iteration will never play frames beyond this one, even if End is set to do so.
  • LoopCount defines the total amount of iterations to play.

Example

If you imagine two animations with code like this:

Looping control example schematics
[ANIMA]
Start=1
End=9
LoopStart=2
LoopEnd=10
LoopCount=-1

[ANIMB]
Start=3
End=5
LoopStart=3
LoopEnd=9
LoopCount=-1

, then the scheme on the right depicts the frames that will be played for ANIMA (upper/black scheme) and ANIMB (lower/blue scheme). Upper scale shows 0-based indices, lower scale shows 1-based indices.