The short version of what I'm looking to do is generate random rotation on a layer whenever there is change to the color value of the layer. This part I have figured out by using for a 10fps comp. In order to define "change" I'm just having after effects compare the color value of the layer at the current frame to the frame before it. The slider is creating a color value for the layer.
The issue I'm running into is that whenever there is NO change between the current frame and the frame before it, the rotation value returns to the value it was at the VERY first frame. What I'd like it to do is rotate randomly within that range whenever there is change and when there is not change, the rotation should stay at whatever the last random value generated was.