Thank you Dan, much appreciated!
it did not work at first, but I got the error
Class ‘Array’ has no property or method named ‘2’.
I tried replacing the 2 with 1 and this worked.
So the full working script is as follows:
i’ve used this expression on puppet pins. and it works really well for what i’m doing.
really appreciate the help, thanks again!
wAmp = 100;
wFreq = 1;
if (time < 0){
w = wiggle(thisComp.layer("WIGGLE").effect("wiggle_amount")("Slider"),thisComp.layer("WIGGLE").effect("wiggle_rate")("Slider"),1,1,-time);
[valueAtTime(-time)[0],w[1]];
}else{
w = wiggle(thisComp.layer("WIGGLE").effect("wiggle_amount")("Slider"),thisComp.layer("WIGGLE").effect("wiggle_rate")("Slider"));
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){
v = velocityAtTime(key(n).time - thisComp.frameDuration/10);
amp = .05;
freq = 4.0;
decay = 2.0;
[w[0],w[1],value[1]] + v*amp*Math.sin(freq*t*2*Math.PI)/Math.exp(decay*t);
}else{
[w[0],w[1],value[1]];
}
}