Hi i have one more question,
the code work perfectly when i have one creature but when i have more than one creature, they all go to the closest water source.
So i have three creatures and three water sources, the code find the closest water source for one creature (the creature with the shortest distant between that creature and a water source) and then all the creatures go to that water source.
How can i differenciate the creatures ?