511 posts
  • Has referred 10+ members
  • Has sold $10,000+ on Envato Market
  • Has been a beta tester for an Envato feature
  • Has collected 10+ items on Envato Market
+3 more
5p1r17 says

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:

f=effect(“Particular”)(3).key(2).value;

f=thisComp.layer(“SLIDER_LAYER”).effect(“TestXXX”)(“Slider”);

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

5257 posts
  • Elite Author: Sold more than $75,000 on Envato Market
  • Has sold $125,000+ on Envato Market
  • Helps us moderate the forums
  • Has been part of the Envato Community for over 5 years
+11 more
felt_tips Moderator says

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.

-f.

511 posts
  • Has referred 10+ members
  • Has sold $10,000+ on Envato Market
  • Has been a beta tester for an Envato feature
  • Has collected 10+ items on Envato Market
+3 more
5p1r17 says

Thanks for fast reply Felt!

Things become more complicated than I thought…. :D

Anyway, thank you again!

-Vlad

Helpful Information

  • Please read our community guidelines. Self promotion and discussion of piracy is not allowed.
  • Open a support ticket if you would like specific help with your account, deposits or purchases.
  • Item Support by authors is optional and may vary. Please see the Support tab on each item page.

Most of all, enjoy your time here. Thank you for being a valued Envato community member.

Post Reply

Format your entry with some basic HTML. Read the Full Details, or here is a refresher:

<strong></strong> to make things bold
<em></em> to emphasize
<ul><li> or <ol><li> to make lists
<h3> or <h4> to make headings
<pre></pre> for code blocks
<code></code> for a few words of code
<a></a> for links
<img> to paste in an image (it'll need to be hosted somewhere else though)
<blockquote></blockquote> to quote somebody

:grin: :shocked: :cry: Complete List of Smiley Codes

by
by
by
by
by
by