-
adding flickering fade in characters to an existing expression
Hi all!
I’m trying to figure out how to add a flicker option (while fading in) to an existing expression. Basically it’s a triggered- by -marker expression selector. It’s a mess, but it works for now:
delay = .05;
if(effect("random")("Checkbox")==true){
seedRandom(textIndex,true);
myDelay = random(delay)*30;
}
else myDelay = delay*textIndex;m = marker
n = 0;
if (m.numKeys > 0){
n = m.nearestKey(time).index;
if (m.key("in").time > time) n--;
}
if (n > 0){
t = time - (m.key("in").time + myDelay);
startVal = 100;
endVal = 0;if(effect("random")("Checkbox")==true){
dur = (effect("dur")("Slider"))*15;}
else dur = effect("dur")("Slider");dur =effect("dur")("Slider")
if (t < dur){
go = ease(t,0,dur,startVal,endVal)
}else{
amp = ((endVal - startVal)/dur)*.55;freq = 1.5;
decay = 15;
w = freq*Math.PI*2;
go = endVal + amp*Math.sin((t-dur)*w)/Math.exp(decay*(t-dur))/w;
}
[go,go]
}else
valueSo I tried unsuccessful ways to add variations of this one (from this post) adapted to my needs,
maxDelay = .75;
fadeTime = .5seedRandom(textIndex,true);
delay = random(maxDelay);
t = time-inPoint;
seedRandom(textIndex,false);
if (t < delay)
100
else
random(linear(t,delay,delay+fadeTime,100,0))
inside my expression, (adding first a checkbox called flicker to the layer), with no success (and if it seemed to work, it was working awfully bad):Any ideas? I feel like was close, but never got the right way to make it work u_u
Thanks!