-
random move in a grid
i have a square shape 40 by 40.
i want it randomly appear inside my grid, my composition is 1080px by 200px.
the grid is a by multiple of 40.the random function will generate multiple of 40.
at the moment it appearing with no order.
holdTime = .3; //time to hold each position (seconds)
minVal = [0 , 0];
maxVal = [1080, 200];
seed = Math.floor(time/holdTime);
seedRandom(seed,true);
random(minVal,maxVal);