Copy link to clipboard
Copied
I'm using `seedRandom` to produce random position coordinates on a layer. I'm also using `holdTime` to only change position once every second. Is there a way to keep this function but also seed the randomization so that when applying the expression to other layers I can get the same random values?
I don't think I can have them parented to the same null object or just in the same pre-comp because I need to apply different layer styles and masks to different layers but I'd still like for some of them to have the same randomized positions.
Below is the current expression I'm using.
`var holdTime = 1;
seed = Math.floor(time/holdTime);
seedRandom(seed,true);
x = gaussRandom(0,1920);
y = gaussRandom(0,1080);
[x,y]`
Copy link to clipboard
Copied
You can choose a random seed by hard coding a value, but instead of the hold time code, you can simply add
`posterizeTime(1)` to the top to update the expression once a second. This allows you to set the frame rate for a given property as opposed to a layer or the entire composition. https://ae-expressions.docsforadobe.dev/global.html?highlight=posterizetime#posterizetime-updatesper...