Hi,
For this you need few things:
-- create a series of global events like
"TEAM A ATTACK"
"TEAM A DEFEND"
"PLAYER HAS BALL"
you can pass variables with these events, for example the player name that has the ball
and then, based on the ball situation, you broadcast these events to your players, so when a player from team 1 has the ball, you should fire "TEAM A ATTACK" to everyone and they will then respond in their own way.
each player would respond to these events, do further checks on their situation, who has the ball, their situation compare to the ball and the goal and promote themselves as likely to defend or attack properly. For this, I would use ArrayMaker
https://hutonggames.fogbugz.com/default.asp?W715you could sort your teams in order of the closest to the ball or strategice points and the AI would simply fire a "CATCH BALL" to the first few players on top of that list.
Also, make use of triggers, they will help you define logic easily. for example each player should have a radius of reach for the ball, and typically this will be a lot more performant if you use triggers for this, the ball itself should have this trigger as well, so that it can promote players to know they are within ball reach.
All in all ( I got your pm), 4 days to do that is totally unrealistic... I am sorry. You can get something to work, but doing a footbal AI is actually very complex, and just implement the football rules is big deal. So your best bet is to define the simplest approach to have something looking like a ball game, then you can build up on this, but to get something done in 4 days, you need to define your specifications very well, and also cut down a maximum of uncessary behaviors and bring it down to the bear minimum. Typically, when in such tight deadline, I always try to achieve something workable asap, and then cleanup add more features. So typically here, I would first make sure I can have a player that knows how to seek the ball, run towards the goal and kick into the goal. This is your first major task, then you can build up on this.
Bye,
Jean