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

Combine two expressions for one element

Community Beginner ,
Mar 29, 2017 Mar 29, 2017

Copy link to clipboard

Copied

Hello community,

I have several objects where I have parented the transform y to a null object. But I also have to limit the different y values for each object individually. So I have the parent code: comp("00_MASTER").layer("Null 5").transform.yPosition and the clamp code: clamp(value,152,521).

But since they are both on the transform y, I have difficulties to get them both run at once. How should I put them both in one?

comp("00_TAIL_BEHIND_NEEDLE_MASTER").layer("Null 5").transform.yPosition;

clamp(value,152,521);

Do they need to be separted by a semicolon or a comma? I don´t get it.

I highly appretiate any helpful hints.

Thanks in advance

E.

Views

365

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

LEGEND , Mar 29, 2017 Mar 29, 2017

"value" is a a reserved keyword that fetches the pre-expression propertyy stream value. You cannot use it in the manner you did. You have to use a user-defined variable name.

mRef=comp("00_TAIL_BEHIND_NEEDLE_MASTER").layer("Null 5").transform.yPosition;

clamp(mRef,152,521);

Mylenium

Votes

Translate

Translate
LEGEND ,
Mar 29, 2017 Mar 29, 2017

Copy link to clipboard

Copied

"value" is a a reserved keyword that fetches the pre-expression propertyy stream value. You cannot use it in the manner you did. You have to use a user-defined variable name.

mRef=comp("00_TAIL_BEHIND_NEEDLE_MASTER").layer("Null 5").transform.yPosition;

clamp(mRef,152,521);

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 Beginner ,
Mar 31, 2017 Mar 31, 2017

Copy link to clipboard

Copied

Hello Mylenium,

thanks for the quick response. I will give it a shot and report. I have assumed that I would probably need a variable and feared that my simple "do this and then do that" will not work.

Thanks man.

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
LEGEND ,
Apr 04, 2017 Apr 04, 2017

Copy link to clipboard

Copied

Did Mylenium's answer solve it for you? If so, please hit the green star "Correct Answer" button on the forums to mark it so.

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 06, 2017 Jun 06, 2017

Copy link to clipboard

Copied

LATEST

Sorry for the late answer - busy with projects.

Myleniums answer works like charm

Thanks a lot!

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