LoopCount
The number of passes an animation of the type makes before it ends or chains.
- Applies to
- AnimType
- File
art.ini- Section
[<ObjectType ID>]- Value
- integer
- When omitted
0
The game multiplies this setting by the number of passes it requests when it creates the animation. The result wraps into the range 0 to 255, and a result of 0 then counts as 1. Most animations are requested for one pass. Some are requested for several, such as the fires on a damaged building. 0 and 1 therefore both give a single pass when one is requested. When several are requested, 1 plays them all and 0 still plays one.
With one pass requested, the extremes behave as follows:
-1loops until something else removes the animation, such as the structure it belongs to.255and-257do the same. When several passes are requested,-1is multiplied first and gives a finite count: 254 passes when two are requested.256acts like0and257like1, so both give a single pass.-256and-255also give a single pass.-2to-254give long finite counts:LoopCount=-2plays 254 passes.
[MYREFN_C] ; an active animation for a refineryImage=MYREFN_CLoopStart=0LoopEnd=16LoopCount=-1 ; runs until the structure stops itRate=350Surface=yesWith more than one pass, each pass plays a different stretch of frames:
- The first pass starts on
Startand ends atLoopEnd. - Each middle pass starts on
LoopStartand ends atLoopEnd. - The last pass starts on
LoopStartand runs to the end of the stage count inEnd.
A PingPong=yes animation never uses up a pass. It reverses direction at each end instead of finishing, so the count never ends it. The count still decides where it turns:
- With a single pass, it turns at the end of the
Endstage count and at its first frame. - With more than one pass and
Start=0, it turns atLoopEndand at its first frame.