Thanks for reply. I tried to rewrite it, but it didn’t work, probably still not right. I tried to show on the video what I need.
var x = thisComp.layer(“Data_02”).effect(“Point Control”)(“Point”)[0];
var y = thisComp.layer(“Data_01”).effect(“Point Control”)(“Point”)[0];
var isTriggered = x < y;
var modifiedTime = time + isTriggered;
if (isTriggered) {
var animationDuration = 5;
var startTime = Math.floor(modifiedTime / animationDuration) * animationDuration;
var endTime = startTime + animationDuration;
t = linear(modifiedTime, startTime, endTime, value, thisComp.layer(“Line_01”).transform.yPosition);
} else {
t = value;
}
t;
https://www.dropbox.com/scl/fi/d32yixi2m7icktgsglekw/bandicam-2024-01-14-19-33-15-466.mp4?rlkey=hra3wx9wsnwwjrzhcbs9s9afu&dl=0