• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

How can I use expresions only on x dimension if I cant separate 'em ?

Community Beginner ,
Jun 26, 2017 Jun 26, 2017

Copy link to clipboard

Copied

bcdfc2b8351061c1e47320a9021b22b1.pngThis is effect called advanced lightning, it has those anchor point-like start and end points, I want to sync the the point going up and down to music. For that I will use the value Im getting from Sound keys effect [Im syncing it to bass]. I'd  be parenting the value I get to anchor point X value, but I can't separate dimensions, what can I do to make this happen ?

Views

6.6K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Community Expert , Jun 26, 2017 Jun 26, 2017

Yep, as Mylenium said.

Arrays are expressions' way of addressing properties with multiple values. (Here's some good explanation.)

For 2d position, x & y become [0] and [1] in expressions. (For 3d: [0], [1], [2])
While technically not necessary, it's often helpful to use variables to keep track of what you're doing. So, yours might look like:

x=value[0];
y=(pickwhip to appropriate property);
[x,y]

If you wanted to retain control over the Y value, but have it also be affected by another property, you cou

...

Votes

Translate

Translate
LEGEND ,
Jun 26, 2017 Jun 26, 2017

Copy link to clipboard

Copied

Position values are arrays and you always can splice out a single value by addressing its array index, in your case simply as value[0] for the X component.

Mylenium

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jun 26, 2017 Jun 26, 2017

Copy link to clipboard

Copied

Yep, as Mylenium said.

Arrays are expressions' way of addressing properties with multiple values. (Here's some good explanation.)

For 2d position, x & y become [0] and [1] in expressions. (For 3d: [0], [1], [2])
While technically not necessary, it's often helpful to use variables to keep track of what you're doing. So, yours might look like:

x=value[0];
y=(pickwhip to appropriate property);
[x,y]

If you wanted to retain control over the Y value, but have it also be affected by another property, you could do something like:

x=value[0];

y=value[1]+(pickwhip to appropriate property);

[x,y]

In that second case, it'll be linked to the Sound Keys property, but you'd also be able to keyframe the Direction independently of the expression. Whether you use +, -, *, /, etc. is up to you.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Jun 27, 2017 Jun 27, 2017

Copy link to clipboard

Copied

Thank you! Just needed to not be as stupid as I was, that cleared out a lot for me. It works !

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jun 27, 2017 Jun 27, 2017

Copy link to clipboard

Copied

Dan Ebberts is the grandfather of After Effects Expressions.  His site is great for learning some of the basics and useful tricks:

MotionScript.com - main page

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jun 27, 2017 Jun 27, 2017

Copy link to clipboard

Copied

LATEST

Heh. Nothing stupid about the question. It's hardly the most intuitive thing. 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines