-
I’m trying to achieve looping Y movement on a clip using scripts
Hello nice, helpful people!
I’m trying to get a clip to recognise when it is higher up the screen than a certain point (in this case 60) so that it can then reset it’s position to the bottom of the screen and do it all again. All the animation needs to be run by expressions so I can vary the speed, start position and end positions dynamically.
I’m a bit stuck. The script works at first and the little black square moves up the screen, then when it gets to the conditional statement (less than 60) it resets back to 900 (so far so good…) BUT it doesn’t start to go up again. I don’t get an error message, so the script’s obviously correct, but it’s not doing what I need it to.
Any ideas how I can get it to do what I want? All help much appreciated.
velocity = -300
x = position[0];
y = position[1]+ (time - inPoint) *velocity;
reset = 900if (y<60){
y=reset;
[x,y]
}else{
[x,y]
}

