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 figure is multiplied by the number of passes the code creating the animation asks for — one, for almost everything that creates an animation — and the product is what the animation counts down. 0 and 1 both give a single pass, because a product below one is raised to one.
More than one pass changes which frames play. The opening pass begins on Start and ends on LoopEnd; each pass after it begins on LoopStart and ends on LoopEnd; and the final pass begins on LoopStart but runs to the end of the stage count in End instead.
The count is kept in a single byte, which decides what the extremes do:
-1is stored as 255, and 255 is the one value that is never counted down — the animation loops until something else takes it away. This is how an animation that has to run for as long as the structure or effect it belongs to is written.- A figure of 256 or more wraps into the byte before the raise to one is applied, so
LoopCount=256gives a single pass andLoopCount=257gives one as well. - A negative figure other than
-1wraps to a large positive count:LoopCount=-2runs 254 passes.
[MYREFN_C] ; an active animation for a refineryImage=MYREFN_CLoopStart=0LoopEnd=16LoopCount=-1 ; runs until the structure stops itRate=350Surface=yesA PingPong=yes animation normally spends no pass at all, so the count only chooses which pair of frames it turns around on.