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

Animation Looping

From ModEnc
Jump to: navigation, search

Here is the animation looping control flag descriptions. The loop control allows to set start/end frames for the first iteration of the loop and start/end frames for all other iterations in the loop.

Animations

The following apply to any animation:

  • Start defines a 0-based index of the first frame to play on the first iteration. Start is used for first iteration irrespective of the number of total iterations defined for this animation. Start defaults to 0 if not defined.
  • End defines the number of frames to play for the first iteration. End is only used if the total number of iteration is 1, which happens when LoopCount is not defined or LoopCount=1. If the total number of iterations is more than 1, then End value is disregarded and instead LoopEnd is used. If End is not given or if it has a larger number than existing frames, the first iteration will end anyway with the last frame of the SHP (it could be the shadow frames as well unless Shadow=yes is set in RA2/YR making it to end with the last normal frame).
  • LoopStart defines a 0-based index of the first frame for loop iterations.
  • LoopEnd defines a 1-based index of the last frame when total number of iterations is more than one.
  • LoopCount defines the total amount of iterations to play. Value 1 is for a single iteration where the Start and End values are used instead of LoopStart and LoopEnd. Value -1 is used for infinite loop.

Projectiles

Animated projectiles have their own set of flags which achieve the same effect as the loop flags above, albeit with somewhat less control.

  • AnimLow defines a 0-based index of the first frame.
  • AnimHigh defines a 0-based index of the last frame.

The animation will loop indefinitely until the projectile expires in one way or another.