seedRandom - How to get different values every time I preview
Hi,
So iv'e used Dan Ebberts script to randomly position a layer across time.
My problem is that every time I preview the comp - my layer traverses the exact same path.
The random numbers generated the first time are regenerated every time I preview the comp. I would like to have a different value for each position every time I preview the comp.
Here is Dan's script:
segMin = .7; //minimum segment duration
segMax = 1.7; //maximum segment duration
minVal = [0.1*thisComp.width, 0.1*thisComp.height];
maxVal = [0.9*thisComp.width, 0.9*thisComp.height];
end = 0;
j = 0;
while ( time >= end){
j += 1;
seedRandom(j,true);
start = end;
end += random(segMin,segMax);
}
endVal = random(minVal,maxVal);
seedRandom(j-1,true);
dummy=random(); //this is a throw-away value
startVal = random(minVal,maxVal);
ease(time,start,end,startVal,endVal)
