ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

Expression for middle response

COW Forums : Adobe After Effects Expressions

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Joaquín Sánchez
Expression for middle response
on Mar 13, 2018 at 6:00:07 am

Hi, i'm trying to make an expression that response to the 50% of the value of a null object for example.

If "null" has 0%, then "controller" has 0%
If "null" has 25%, then "controller" has 50%
If "null" has 50%, then "controller has 100%
If "null" has 75%, then "controller" has 50%
if "null" has 100%, then "controller" has 0%

How can i do this?


Return to posts index

Dan Ebberts
Re: Expression for middle response
on Mar 13, 2018 at 6:15:58 am

Something like this maybe:

x = thisComp.layer("null").transform.opacity;
(x < 50) ? x*2 : 200 - x*2


You didn't mention the property, so I set it up for opacity.

Dan



Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2018 CreativeCOW.net All Rights Reserved
[TOP]