@b10b can you use more simple english please sorry I can't understand your last paragraph. I want to share my find location function maybe it helps to understand my current situation;
locateEnemy(){
var targetLocation;
var locationX;
var locationY;
var skin;
switch(this.lastLocation){
case 0:
this.lastLocation = 1;
locationX = 112;
skin = "enemy2";
break;
case 1:
this.lastLocation = 2;
locationX = 146;
skin = "enemy";
break;
case 2:
this.lastLocation = 3;
locationX = 180;
skin = "enemy";
break;
case 3:
this.lastLocation = 0;
locationX = 78;
skin = "enemy2";
break;
}
locationY = (Math.random()*400) - 420;
while(this.checkEnemyOverlap(locationX, locationY, this.enemies)){
locationY = (Math.random() * 400) - 420;
}
return [locationX, locationY, skin];
}
locationX represents to which line, and there is while loop to check is there overlap with any other enemy car. Don't forget the lines moves different speed so I can't trust to locate perfectly at first position. Because of speed is different first position becomes doesn't matter. So if could you be more specific on how to modify locationY than maybe I can understand more easily. Sorry again to bother you more, but I really trying to understand