Hi,
So in the project I am working on there is a player who can multiply and the person playing the game is able to modify the game. I am using instantiate to make him “multiply”:
public GameObject prefab;
// Update is called once per frame
void Update () {
if (Input.GetKeyDown(KeyCode.G))
{
Instantiate(prefab, new Vector3(transform.position.x, transform.position.y, transform.position.z), Quaternion.identity);
}
}
}
The problem is that I don’t know how to gain control of the future clones that emerge. They usually just drop and do nothing. How am I able to code for the future clones. I can’t just make copies of the player that are coded because there are multiple combinations you can make with the player so coding all the players combinations is tedious. I would think I would need to somehow make the future clones a variable to modify. Any suggestions. Thank you advance.