Skip to main content
Known Participant
May 16, 2024 2:30 PM UTC
Question

Delaying animation with expression controls instead of keyframes

Hello,
To get a slight delay in my animation on each duplicated groups, i made this simple expression on a trim path :

i=(thisProperty.propertyGroup(2).propertyGroup(1).propertyIndex)-1;
value + valueAtTime(time+i/10)

 

But i just want only one set of keyframes to control every groups. 

if i replace the "value" by a slider control for example, the delay no longer works. I don't know why.

Any idea? Thanks

This topic is closed to new replies. Start a new post to keep the conversation going.

6 replies

Mylenium
Legend
May 16, 2024 5:11 PM UTC

Why would you replace the "value" with the slider? This makes no sense. You need to manipulate the time inside the valueAtTime() function. Of course you may need a ton of extra code with linear() functions if you need exact values instead of the oens the function gives you, but I think you simply misunderstand the basics.

 

Mylenium

Translate
Known Participant
May 17, 2024 7:14 AM UTC

Because i want to duplicate the animation on a great amount of sub groups and be able to edit theire animation interpolation with 2 keyframes instead of hundreds. the linear doesn't give me this flexibility of editing though.

Translate
Dan Ebberts
Community Expert
Community Expert
May 16, 2024 3:06 PM UTC

Posting a screen capture of your timeline would help.

Translate
Known Participant
May 17, 2024 7:09 AM UTC

there it is

Translate
Dan Ebberts
Community Expert
Community Expert
May 17, 2024 3:35 PM UTC

I think it will be something like this:

delay = .1;
n = thisProperty.propertyGroup(4).numProperties;
myIndex = thisProperty.propertyGroup(3).propertyIndex;
diff = n - myIndex;
myDelay = diff*delay;
s = effect("Slider Control")("Slider");
s.valueAtTime(time - myDelay)
Translate