If you just want it to stop where it is at a particular time, I think I’d do it this way:
myEndTime = 4;
segMin = 1.0; //minimum segment duration
segMax = 3.5; //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;
if (time < myEndTime) t = time else t = myEndTime;
while ( t >= end){
j += 1;
seedRandom(j,true);
start = end;
end += random(segMin,segMax);
}
endVal = random(minVal,maxVal);
seedRandom(j-1,true);
dummy=random();
startVal = random(minVal,maxVal);
ease(t,start,end,startVal,endVal);
Just set myEndTime to the time you want it to stop.
Dan