There’s probably an easier way to do this but if you know when you want it to move and for how long this is a messy way to do it
valuea = [200, 500];
valueb = [200,600];
valuec = [200,790];
valued = [500,790];
inPointa = 0;
outPointa = 2;
inPointb = 4;
outPointb = 6;
inPointc = 8;
outPointc = 10;
if (time < outPointa){
ease(time,inPointa,outPointa, valuea, valueb)
} else if (time < outPointb){
ease(time,inPointb,outPointb, valueb, valuec)
} else if (time < outPointc){
ease(time,inPointc,outPointc, valuec, valued)}
If the transistion is always going to be the same you could probably reduce it to this
valuea = [200, 500];
valueb = [200,600];
valuec = [200,900];
valued = [500,900];
inPointa = 0;
inPointb = 4;
inPointc = 8;
if (time < inPointa + 2){
ease(time,inPointa,inPointa +2, valuea, valueb)
} else if (time < inPointb + 2){
ease(time,inPointb,inPointb +2, valueb, valuec)
} else if (time < inPointc +2){
ease(time,inPointc,inPointc + 2, valuec, valued)}
But there’s still probably a way to reduce it further or to write it in general, but I’m not that good.