So I want to do a math Random thing where its like from one spot to another like... It only spawns between 300 and 400 on the y direction... here is what I have for random code
objArr[j].y = Math.round(Math.random() * 550);
YOu may want to use a base number, then an add random function to get the 300 and 400 of y direction
For the random code:objArr[i].y = Math.round((Math.random() * 100) + 300)If you want the y variable to be a random number from 300 to 400.
You must be logged in to post a reply!