However, it only checks if one of the organisms wants to reproduce, but I want both objects to meet that condition for it to activate.
How can I differentiate between the object instances to check such a thing?
In that case, I would need to assign each object instance a variable when born, which again means I would need to specify the newborn organism on the condition.
you can always treat all the objects as an organism even if they are alive or dead think as family
Organism->Father → name “Eric” → is male and has power of 10
Organism->Mother → name “Magda” → is female and has power of 20
Organism->Child → Maximo → is male and has power of 5
Organism->Child ->Wanda → is female and has power of 3
All are organism but they can be male or female and have diffent powers or abilities.
So two objects collide, and you want to be able to refer to both of them individually…
One option might be to (in a sub-event of the collision) pick the object closest to point 0,0 (then check its reproduction variable, etc.). Then in another sub-event pick the object furthest from 0,0 (i.e. the other organism out of the two) and check its variable. That’ll hopefully be one way to differentiate them.
I think that will work, thanks!
Though I’ll still need to differentiate the organisms after mutation (giving a random variable number to an organism when they’re born, like genes), and at some point, I will need a solution to that problem.