Thanks everyone! I'll try this tonight when I'll get back home
Basically, I'm trying to build an AI which is going to extinguish fires depending on their roles. Guys with roles 1 should be the first one to move to stop the fire, and guys with role 2 should only go there if guys with role 1 are all busy trying extinguishing the fire
Hopefully I'll manage to do it with your advice.