Sending a message to a object based on proximity alone.

The game i’m working on is a evolution simulator.
I need the fox to when in the proximity of a rabbit send a message to it.
The issue is that I need it to single out a rabbit and then move on to the next one and keep on doing this till it dies.
I had this working at one point by using the last contacted setting on the message but now it doesn’t appear to be working ( probably cause it only works with collisions)
Thanks !!! https://flowlab.io/game/play/1455710

If any of you are interested this was fixed by causing Proximity of the rabbit to send a message to all rabbits, and for the rabbit to only act upon it if the rabbit was in the proximity to a fox.

If you wanted to make this more specific you could probably track the positions of both the creatures and if they are of similar sizes the rabbit would act on it.
This would be done by making the fox send his position through the message and if it is of a similar value to the rabbits the rabbit could act on it

This is kinda pointless to know unless you want to make an ecosystem or have enemies attack each other or even want to make to armys attack eachother

Thanks if you read this :smiley:

I think sending to all rabbits is good as long the fox is near it.
When only 1 rabbit is running away, make the others stop thats not near the wolf by using a NOR gate with the proximity. This way only the rabbits near the fox will run away.
2020.07.14-19.22

Now you need to fix up the the rabbits to run away from the wolf.