I have two ants and two flowers. Both ants have to move to the same flower. One ant has a free way to the flower but the second ant has to ignore a flower in his path.
The flowers has a Variable called ID, the ants has a Varriable called Target with the ID value of the flower. Both ants have the value 1 in Target
Ant 1 collisions with flower 1 and the ant stops moving. Great!!
When ant 2 collisions with flower 2 stops moving too. Bad!!! Has to go to flower 1 and then stops.
What’s wrong here?
Just a test I made… If I change “SET 0 to move” to “Delete Ant”, the second ant ignores flower 2 and stops in flower 1 like I want to
It’s working, but, is this the correct way to do it? Because now my event don’t start with a collision, instead of that, I’m always making the “for each of ants” and then checking collisions.
Are more resources used checking collisions in this way?
i suspect that your first approach should be about half as expensive, because it needs to check all ants once. the second approach would be checking each ant times number of ants.
Just a speculation, not sure.