Expression to change single property value over several frames once a condition is met.
I have 30 layers. I have a random number generator (1-30) on a Null Slider Control. I have a preset expression applied to the 30 layers that on each frame compares the random number from the Null to the index of the layers, if the condition is met (random# = index) the opacity toggles from 0 to 100. Changes the opacity back to 0 when the condition is no longer met. Works great. No markers, no keyframes.
What I'd love to add is a gradual fade from 100 back to 0.
AE doesn't support events, so when the match is made on frame X, there's no trigger to start the fade over several frames. AE reruns the expression on every frame and (I think) it has no method for storing variables that can exist from one frame to the next, so I can't store the time when the match is made to then use as the starting frame for a loop to control the fade.
Is there any way to add a change in value for the opacity (or really any property) over several frames once the expression hits the necessary condition?
