Percentage Series Argument Type
For many effects properties, a value will vary over time. An argument can be a
percentage series, and is made of sets of numbers, each set defining a property value at a particular
relative time.
This is easier to show than to explain abstractly. So here is an example property setting:
So, in this example, at 1 second the relative time would be 50 percent. At this time the
color at time 0,
254/232/156/255 (a fully opaque yellow) would be blended with the color at time 73,
255/255/162/193 (a slightly stronger semi-transparent yellow). Blending is linear, i.e. at time
50 it blends between time 0 and 73. So time 0's color would be weighted by (73-50)/(73-0) = 0.32,
and time 73's color would be weighted by (50-0)/(73-0) = 0.68. So the color at time 0 would
be multiplied by 0.32, the color at time 73 multiplied by 0.68, and the two results are added
to get the color at time 50.
Though rarely done in practice, the ending time can be any value less than 100.
All that this means is that the last value specified
is held until relative time 100.
Note that any percentage series can be replaced by a single argument, e.g.
Go to the All Properties list, All Types list, Class file list, CON file list, or Main scripting page.
ObjectTemplate.TimeToLive CRD_NONE/2/2/0
ObjectTemplate.ColorRGBAOverTime 0/254/232/156/255|73/255/255/162/193|100/255/255/128/0
Each set of numbers t/r/g/b/a is divided by a "|". The first set defines the RGBA color and
transparency at time 0, the second set the color at time 73, the third at time 100.
The relative time goes from 0 to 100, with time 0 is the beginning of the effect and 100
the end. The actual time that the effect lasts is set in ''TimeToLive'' as two seconds.
ObjectTemplate.alphaOverTime 0/1|100/1
is the same as
ObjectTemplate.alphaOverTime 1