public void CreateNextPowerUp() { numOfPowerUps++; float x = (Random.Range(0.0f, 1.0f) * xScale) - offsetX; float z = TheShip.position.z + Random.Range(200.0f, 500.0f); SpawnPowerUp(x, z); Debug.Log ("powerup spawned at : " + x + " ; " + z); }