-
Referencing another layers position only if size =0
Hi all,
I’m trying to build a trail of dots that emerge from the end of a line that travels along a path (think mouse pointer trails) and slowly shrink down to notheing. The catch is that once they have appeared, the dots must stay locked to the background (ie; not following the movement of the line that ‘gave birth to them’).
I have an ellipse shape that shrinks down to nothing. It’s keyframed with a loopout in cycle mode. The idea is that once the layer hits a size of “0” I can move it to become the new dot, so I don’t have to have a new layer for every dot and the animation can be any length with the same overhead.
I have a Null chasing the position of the end of the line.
Thing is, I can’t get the expression to sample the new position from the Null *only when size is “0”.
This is what I have;
nullPos = thisComp.layer(“Null 2”).transform.position;
if (content(“Ellipse 1”).content(“Ellipse Path 1”).size<=0)
{
nullPos;
}
else
{
value;
}Currently, what happens is that the Ellipse just stays blinking in the one spot, or follows the position of the null at every frame.
I thought the conditional ‘if’ statement would get around the fact that AE asseses expressions on each frame.
I’m new to this – please help me before I eat my keyboard in frustration!
Many Thanks
Markus
nullPos = thisComp.layer("Null 2").transform.position;
if (content("Ellipse 1").content("Ellipse Path 1").size<=0)
{
nullPos;
}
else
{
value;
}