-
Wiggle + bounce effects on scale
Hello to everyone,
I’m quite new on after effects scripts and this could be an easy question for most of you but for me is something impossible to solve. I would like to use in a layer two different animations on Scale, on one side a wiggle that should be working all the time; on the other side, at second 9 the layer’ scale gets increase and I want to use a bounce effect on it. I tried these two functions independently and they work well, but when I write both together on the Scale scripts just works one of them…
How can I use more than one function on the same script, this is a limit that I always have when using scripts?
Thanks!!
Martin R.
/*Animation1*/
w = wiggle(5,3);
[w[0],w[0]]/*Animation2*/
n = 0;
if (numKeys > 0){
n = nearestKey(time).index;
if (key(n).time > time){
n--;
}
}
if (n == 0){
t = 0;
}else{
t = time - key(n).time;
}if (n > 0 && t < 1){
v = velocityAtTime(key(n).time - thisComp.frameDuration/10);
amp = .05;
freq = 4.0;
decay = 8.0;
value + v*amp*Math.sin(freq*t*2*Math.PI)/Math.exp(decay*t);
}else{
value;
}