Hello im trying to make my enemy spawn at one of three locations randomly and i made a script
but after some time it start to spawn at all three locations at once .
if (vreme < 0) {
vreme = 10;
Debug.Log (broj);
broj = Random.Range (1, 4);
if (broj < 2 && broj > 0) {
Instantiate (EK, SPoint1, Quaternion.identity);
broj = 0;
}
if (broj < 3 && broj > 1) {
broj = 0;
Instantiate (EK, SPoint2, Quaternion.identity);
}
if (broj > 2) {
Instantiate (EK, SPoint3, Quaternion.identity);
broj = 0;
}
}