-
A better way to write this?
I like to think i know just enough about expressions to mess a lot of stuff up lol. The following “works”, as in doesn’t break but it makes AE run unusably slow. Its pretty straight forward, i have a grid of tiles animating into the screen, via valueAtTime referencing the null. I often do this and set up a sort of Random rig as you see, creating controls for the seedRandom and random amount on the valueAtTime. But what you see here is my first attempt at being able to activate that Random with a checkbox, which is where things really slow down. I figured maybe instead of randomizing the actual time referenced, it would be faster to randomize the index its referencing, up to numLayers, i dunno, thats why i turn to the experts. Hoping i can get this running faster and learn a thing or 2 in the process. Thanks so much.
anim01 = thisComp.layer(index-1).transform.zPosition.valueAtTime(time-thisComp.layer("controller").effect("tDelay")("Slider"));seedRandom(index+thisComp.layer("controller").effect("Random Seed")("Slider"),true);
r=random(0,thisComp.layer("controller").effect("Random Spread")("Slider"));
anim02 = thisComp.layer(index-1).transform.zPosition.valueAtTime(time-r);
check = thisComp.layer("controller").effect("Randomizer")("Checkbox");
if(check==true){anim02
}else{
anim01
}
