Answered
Adobe After Effects Expression
var x = 0;
var y = 2;
var z = 10;
I want var x value to be increased by 1 (x + 1) after every var y seconds untill time is equal to var z.
What to do?
var x = 0;
var y = 2;
var z = 10;
I want var x value to be increased by 1 (x + 1) after every var y seconds untill time is equal to var z.
What to do?
Dan's idea to use floor to increase by 1 is very elegant. But I think your condition with the z must be implemented like this (since z should be a limit on the time, not on the final value, if I understand it correctly):
x = Math.floor(Math.min(time,z)/y);
Already have an account? Login
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.