Mailing List AE-List@media-motion.tv ? Message #43498
From: Byron Nash <byronnash@gmail.com>
Subject: Expressions: Decay after trigger
Date: Wed, 9 May 2012 10:42:43 -0400
To: After Effects Mail List <AE-List@media-motion.tv>
I am writing an expression to bring the opacity of a layer up when it another layer comes close to it. I'd like to have it decay at a different rate than it builds. Here's what I have going on:

o = transform.opacity;
s = thisComp.layer("center").transform.scale[0]/100; //use the scale to affect the radius of influence of the null
l = length(transform.position, thisComp.layer("center").transform.position);
lprev = length(transform.position.valueAtTime(time-thisComp.frameDuration), thisComp.layer("center").transform.position.valueAtTime(time-thisComp.frameDuration));
if(lprev > l){
  l = lprev;
}
o - (l/s);


My attempt to look at the previous frame doesn't seem to be working. 
 
Subscribe (FEED) Subscribe (DIGEST) Subscribe (INDEX) Unsubscribe Mail to ListMaster