ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

Change the value of object based on comparing Slider value from previous frame with this frame and stop at last value

COW Forums : Adobe After Effects Expressions

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Alex Alvarez
Change the value of object based on comparing Slider value from previous frame with this frame and stop at last value
on Jul 20, 2018 at 10:03:21 pm
Last Edited By Alex Alvarez on Jul 20, 2018 at 11:27:47 pm

Hi, I'm totally a newbie. what I'm trying to achieve is the following
I'm trying to create one object to follow the other both are parented to the same slider if the value of the slider upper 0 and his value in this frame greater than the previous one then follow and if the value of the slider lower than in the previous frame then stop at this value even when slider value goes below 0

Something like this below its my result till that moment




if someone can help I would be appreciated

m = thisComp.layer("Ctrl").effect("Full")("Slider");
e = time - thisComp.frameDuration;
z = m.valueAtTime(e);
f = m.value;
if (f >0 && f<z)brake{
e = time - thisComp.frameDuration;
z = m.valueAtTime(e);
f = m.value;
};


Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2018 CreativeCOW.net All Rights Reserved
[TOP]