Hi Dan,
Hope it’s okay I interrupt here. I used your code and managed to tweak it a bit to my liking. Now it looks like this, so I have a box going in and out of the frame repeatedly.
What I now want to do is to be able to change the size of the rectangles, to a random size, whenever the rectangle hits the posDown position. And then KEEP that same size until the next time it reaches posDown.
Is that even possible? I played around with using random() on the size property, but it’s changing the size at random at every frame – and if I use seedRandom, it always changes to the same size at every loop. Moreover, I can’t get it to stay at that size.
Just slowly getting the hang of expressions. Challenging, a bit frustrating, but very rewarding!
Thanks in advance.
seedRandom(index,true);
blobSize = content("Rectangle 1").content("Rectangle Path 1").size[0];
holdDur = random(3,4);
moveDur = linear(blobSize,100,500,1,50);
posUp = -blobSize*0.5;
posDown = thisComp.height+blobSize*0.5;
t1 = holdDur;
t2 = t1+moveDur;
t3 = t2+holdDur;
t4 = t3+moveDur;
t = time % t4;
if (t < t1){
posDown
}else if (t < t2){
easeOut(t,t1,t2,posDown,posUp)
}else if (t < t3){
posUp
}else{
ease(t,t3,t4,posUp,posDown)
}