Answered
Increase value by 1 only at every ODD keyframe?
Hello! I have this expression that makes the value increase by 1 at every keyframe of "s" property.
s = effect("switch")("Checkbox");
ld = comp("lineDistribution").layer("ctrl");
n = s.nearestKey(time).index;
if (s.key(n).time > time) n--;
n;It's working perfectly. But how do I make the value increase only at ODD keyframes?
Like:
at key(1), value is 1
at key(2), value is 1
at key(3), value is 2
at key(4), value is 2