But then what are the options in the generated example?
dec(image.frame,1,1,1);
and
inc(image.frame,1, get(image.frame), get(image.frames));
Hi Robert,
You've highlighted the saturation options for the
dec and
inc functions.
- inc(var,byvalue*,max*,min*)
- dec(var,byvalue*,min*,max*)
---- increase/decrease values (with saturation)
---- byvalue - add/sub this value to the var, default=1
---- max - max limit, when reaching it, the var will be set to min
---- min - min limit, when reaching it, the var will be set to max
.....................--from releasenotes-1.0.8.10.txt
So applying this to the examples you cited:
dec(image.frame,1,1,1);
In the above example,
dec decreases the
image.frame value by 1 until it passes the minimum value of
1 (in which case it sets it to
1). So no matter how many times you call dec, the
image.frame value never goes lower than 1 (which is the frame number of the first frame). In other words, it never let's you rewind past the first frame.
inc(image.frame,1, get(image.frames), get(image.frames));
Here,
inc increases the
image.frame value by 1 until it exceeds the maximum value of
image.frames in which case it sets it to
image.frames). Here you keep increasing the value of
image.frame until it reaches the last frame number (
image.frames) and then it stops incrementing. So it never let's you fast forward past the last frame.
Hope this helps
steve