AnimationProbability
Chance each game frame that a stopped terrain animation starts over.
- Applies to
- TerrainType
- File
rules.ini- Section
[<ObjectType ID>]- Value
- floating point
- When omitted
0No roll ever succeeds, so an animation that has stopped never restarts.
The figure is a fraction between 0 and 1, and it is only consulted on an IsAnimated=yes object whose animation is currently stopped. Each game frame such an object draws a random fraction and starts its animation when the draw falls below this figure, so .02 gives one chance in fifty per frame — a start every fifty frames on average, a little over three seconds at fifteen frames a second. A percentage may be written instead, and 2% means the same as .02.
[MYTREE] ; example blossom treeIsAnimated=yesAnimationRate=3AnimationProbability=.02 ; one restart every 50 frames on averageSpawnsTiberium=yesThe random draw carries six digits of resolution and never quite reaches 1, so 1 and anything above it restarts the animation on every frame that finds it stopped. Anything at or below 0 never restarts it, which leaves an animation that has run its course stopped for good.
IsAnimated, AnimationRate