public Vector3 GetFlagLocation(int teamNum) { Flag f = flags [teamNum]; if (f != null) { return f.gameObject.transform.position; } else { Debug.LogError("Could not find flag for team "+teamNum); return new Vector3(); } }