I’m trying to use the keyframes for position to drive other parameters, rotation in this case, but only for part of the position animation. The first part, from kf1 to kf2 works fine, but when the object moves to kf3 it is also rotating, which I do not want.
I added a part of the condition that states that if the kf is bigger than 2 then the value should be 0, but as I see the object moving from kf2 to kf3 I see the rotation parameter still following the linear expression instead of defaulting to 0 as I want it to happen.
A couple of things–you seem to be mixing the use of markers and position keyframes–you didn’t mention that in your description, and it’s not clear how that should work. Also, you don’t account for the condition where n is exactly 2, so that could be a problem.