Ok for some reason I cant seem to wrap my head around this, perhaps im tied. I have a list of gameobjects that I instatiate to a random list of spawn points around the world. It works exactly like i hoped but my problem is it only spawns the amount that is in the lists count . I would like it to spawn 100 randomly selected objects from the item list to randomly selected spawns. So 1 spawn might get 2 items another might get 6 another might get 9. for some reason I can figure this out. I’m using photon so perhaps it might have something to do with Photon.Instatiate(“only letting me use a string”,pos,pos, byte);
The loot spawns randomly to the spawns but only the same amount as the count of the list
Any ideas would be great…
this is the instatiate code
void OnJoinedRoom(){
if (PhotonNetwork.isMasterClient) {
for (int i = 0; i < loot.Count; i++) {
if (Random.value * 100 < loot *.spawnChance) {*
_ PhotonNetwork.Instantiate(loot .lootobject.name, lootSpawns [Random.Range (0, lootSpawns.Count)].transform.position, Quaternion.identity, 0);_
* }*
* }*
* }*