I need to know how to spawn an object based on there instance variable. Here is how I want it to be set up:
You set the instance variable of an object (obj1). When you click on the obj1, the obj1 should search a family for a object (obj2) that has the same instance variable as it. Once it finds it, it spawns it.
That it's how I want it to work.
In reality, it doesn't do that, it spawns an object from the family at random. Can you help?