Just an update, I did find a solution for the “height” value. I renamed the variables in the Comp a little bit (its name is “Shape Layer 4”). I came up with this:
x = thisComp.layer("Shape Layer 4").transform.position.valueAtTime(time)[0];
y = thisComp.layer("Shape Layer 4").position.valueAtTime(time)[1];
sp=2;
amp=150;
gravity = 50;
a = Math.sin(time*sp)*amp;
b = time*time*gravity;
if (b >= 900)
value + [a,900]
else
value + [a,b];
However, I still don’t know how to make the “Length” value pause, because I’d need a way to make it stop going from side to side, but at the value it was when it reached that point.
I’d also probably need to do something similar to the rotation.
Anyone has any ideas?