ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

Line Graph Max Value using Beam/Nulls

COW Forums : Adobe After Effects Expressions

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Alexander Gibbs
Line Graph Max Value using Beam/Nulls
on Sep 24, 2019 at 7:59:32 pm

Hi guys,

Struggling with a simple one here.

I have a line graph made up of multiple nulls which go up and down with time. I also have a horizontal beam which I would like to represent the max value of the line.

Eventually, I would like the nulls to 'push' the beam up. As a start, I have a very simple example using one null ("Null") and one beam ("Beam).

Based on the code below, my Beam goes up with the Null, however also comes down. How can I stop this from happening?

Best wishes,

AG

var NullY = thisComp.layer("Null").transform.position[1];
var BeamY = thisComp.layer("Beam").transform.position[1];

if ((NullY<BeamY)){
y = NullY
}
else{
y = BeamY
}
[2505,y]


Return to posts index

Alexander Gibb
Re: Line Graph Max Value using Beam/Nulls
on Sep 24, 2019 at 9:01:44 pm

Should have said that the above code is used as an expression for the position of the Beam layer.


Return to posts index

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