AE: how to change key value with expression

Hi there,

I’ve checked hundreds of AE expression sites and can’t find a simple tip:
How to change certain key value with expression.
In my case, I created a Slider which should change 2-nd key value of particular effect,
but can’t find the way to make it work right…

my expression:



This expression is inside the “particles\sec.” property…

You can’t.

You can read a key value, but not set it.

You can only set the value at the current time with expressions. Otherwise if you want to set the value of specific keyframes, you need to look at Extendscript and scripting.

Your two lines of expression above set the same value twice. The variable f is first set to the value of key 3 on the Particular property. Then it is overwritten by setting it to the value of the TestXXX slider.

You could try something along the lines of testing whether the current time is the same time as a certain key’s time and if so, then setting the property to a certain value, but I think this isn’t what you’re trying to achieve.


Thanks for fast reply Felt!

Things become more complicated than I thought… :smiley:

Anyway, thank you again!