-
AE expression – trigger script on marker
Hi guys,
I have come across a bit stragne thing. I have a layer and I want to randomize its position at each marker. Soundd trivial, but it’s giving me headache so far.The script:
n = marker.nearestKey(time).index;
if (marker.key(n).time == time){
minVal = [0.1*thisComp.width, 0.1*thisComp.height];
maxVal = [0.9*thisComp.width, 0.9*thisComp.height];
random(minVal,maxVal)} else {
value
}So this script does randomize the position at each marker, but when the marker is passed it returns the layer to original position… which is so not what i want 🙂
any thoughts?