How to set the ending or starting keyframe value in an Expression Control in After Effects?

To set ending keyframe value:

[code]

if (numKeys > 1){
newV2 = comp(“DECAY”).layer(“Grass Controls”).effect(“Wind Speed”)(“Angle”);
v1 = valueAtTime(key(1).time);
v2 = valueAtTime(key(2).time);
linear(value,v1,v2,v1,newV2);
}else{
value
}

[/code]

 

To set starting keyframe value:

[code]

if (numKeys > 1){
newV2 = comp(“DECAY”).layer(“Grass Controls”).effect(“Wind Speed”)(“Angle”);
v1 = valueAtTime(key(1).time);
v2 = valueAtTime(key(2).time);
linear(value,v2,v1,newV2,v1);
}else{
value
}

[/code]

 

Reference:

Expression to Control a Single Keyframe’s value

How to start or stop wiggle at specific time in After Effects?

Use time or frames to start i.e.:

frameToStart = 39;
if (timeToFrames() > frameToStart)
{ wiggle(2, 500);
} else {
value;
}

That starts at frame 39.

 

or

 

timeToStart = 1;
if (time > timeToStart)
{ wiggle(2, 500);
} else {
value;
}

 

that after 1st second.

Reference:

How To Start And Stop Wiggle In After Effects At Specific Time