public SearchObjects searchables;
private int randomNumber;
private bool keySpawned;
// Use this for initialization
void Awake () {
GameObject[] searchable = GameObject.FindGameObjectsWithTag ("Searchable");
searchables = new SearchObjects[searchable.Length];
for (int i = 0; i < searchable.Length; i++) {
searchables _= searchable *.GetComponent<SearchObjects> ();*_
* randomNumber = Random.Range (0, 10);*
* if (randomNumber < 3) {*
_ searchable .GetComponent ().hasWard = true;
* } else {
searchable .GetComponent ().hasWard = false;
}
}
}*_
* // Update is called once per frame*
* void Update () {*
* }*
}
im hoping to make inside this loop for a true to come out of it in a random area! it will be the level key! players will have to search for it while avoiding a monster! i need the “keySpawned” bool to be true in a random game object