That’s some old code you’ve got there! It’ll run, but I’ve modernized it a bit below.
The key thing that you want to change are the references to 100 (and 110). That’s what’s setting the opacity to maximum. I’ve changed that out to “value” here instead, which will allow you to set the property itself right in the timeline panel to what you want its default maximum opacity to be.
var blinks = 5; // The number of times to blink while fading in. you can change this and it will recompute for you
var blinkFrames = blinks*2;
var inFrame = timeToFrames(thisLayer.inPoint);
var outFrame = timeToFrames(thisLayer.outPoint);
var currentFrame = timeToFrames(time);
if (currentFrame < (inFrame + blinkFrames)) {
var deltaFrame = currentFrame - inFrame;
if (deltaFrame % 2 == 0) {
0;
} else {
linear(deltaFrame,0,blinkFrames,10,value);
}
} else if (currentFrame < (outFrame - blinkFrames)) {
value;
} else {
var deltaFrame = currentFrame - (outFrame - blinkFrames);
if (deltaFrame % 2 != 0) {
0;
} else {
linear(deltaFrame,0,blinkFrames,value,0);
}
}