//Spawn a skeleton from the chosen parts if none of them is void void CreateSkeleton() { if (playerInventory.heads.Count > 0 && playerInventory.torsos.Count > 0 && playerInventory.legs.Count > 0 && playerInventory.mementos.Count > 0) { if (currentMemento.ID == 0) { GameObject.Find("Tuto").GetComponent <TutoManager> ().skCreated = true; } skSP.SpawnFromParts(currentParts[0], currentParts[1], currentParts[2], currentMemento); playerInventory.RemoveItem(0, playerInventory.GetIDFromReference(0, nfmod(selectedParts [0], playerInventory.GetArrayLength(0)))); playerInventory.RemoveItem(1, playerInventory.GetIDFromReference(1, nfmod(selectedParts [1], playerInventory.GetArrayLength(1)))); playerInventory.RemoveItem(2, playerInventory.GetIDFromReference(2, nfmod(selectedParts [2], playerInventory.GetArrayLength(2)))); playerInventory.RemoveItem(currentMemento); Destroy(currentMementoMesh); aS.PlayOneShot(creationSFX); GameObject conf = Instantiate(confettiFX, transform.position, Quaternion.Euler(new Vector3(-90, 0, 0))); Destroy(conf, 6f); EndAssembly(); } else { aS.PlayOneShot(deniedSFX); } }