0

I can't figure out why I'm getting the error... Any ideas?! I tried adding "var" at the beginning of the first line, but that didn't work. Not sure what to try now! Help anyone?

Below is my code. The error reads: "object of type Layer found where a number, array or property is needed."

timeOffset=thisComp.layer("Mograph Control").effect("timeOffset(frames)")("Slider")/24;
myIndex=thisComp.layer("DotMaster")-index;


seedRandom=(index, timeless=false);
randomTimeAmount=thisComp.layer("Mograph Control").effect("randomTime(frames)")("Slider")/24;
randomActualAmount=random(-randomTimeAmount, randomTimeAmount);

baseTime+(myIndex*timeOffset)+randomActualAmount;

ae-error-img

0

Typo on line 2. It should be thisComp.layer("DotMaster").index not -index.

Also, while it's valid, the first parameter to the random function on second last line -randomTimeAmount makes me nervous. I'd recommend changing it to 0-randomTimeAmount. It's more explicit, and less prone to accidental typos.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.