-
play keyframes at random time
I have a layer with some scale keyframes. Now I would like to loop this animation BUT with a random pause between the loops.
Since it would great if the loop also switches it’s position with every loop I thought it would be a good idea to have an independant value, which could be read from the position and the scale expression.
Maybe something like a slider which randomly switches from 0 to 1, to make the position change and start the loop again.
This would then be the expression for this sliderBut I’m still not sure if this is really the way to go, since I’m having a hard time figuring out the expression for position and the scale keyframes.
segMin = .5; //minimum segment duration
segMax = 2.5; //maximum segment duration
Dur = .05;end = 0;
j = 0;
while ( time >= end){
j += 1;
seedRandom(j,true);
start = end;
end += random(segMin,segMax);
}
if (time > end - Dur){
1;
}else{
0
}