>In order to adjust frequency, in theory, I can just adjust the max value of n, correct?
Yes.
> I am thinking about adding a slider to that max value that allows me to adjust how often the square moves, but the moves will still be random?
Yes, that would be like this:
segDur = .5;
amt = 800;
maxN = effect("Slider Control")("Slider");
t = 0;
accum = prevAccum = [0,0];
seedRandom(index,true);
while (t <= time){
n = Math.round(random(1,maxN));
prevAccum = accum;
switch(n){
case 1:
accum += [0,-amt];
break;
case 2:
accum += [0,amt];
break;
case 3:
accum += [amt,0];
break;
case 4:
accum += [-amt,0];
break;
default:
break;
}
t += segDur;
}
value + ease(time,t-segDur,t,prevAccum,accum)
... View more