Thanks for the thoughts Dan! I’ve been able to write out an UP or DOWN expression:
var oneFrame = thisComp.frameDuration;
var previousFrame = time – oneFrame;
var currentPosition = thisComp.layer(“Blue”).transform.yPosition;
var lastPosition = currentPosition.valueAtTime(previousFrame);
if(lastPosition > currentPosition) {“UP”;}else{“DOWN”;};
But not sure how I would go about triggering the ValueAtTime() and attaching it to the position.