PASSING AND SHOOTING BALL
Pass or shoot uses left or right button respectively to happen. Simultaneously, it record the last person to kick the ball to allot score to the person and respective team.
The players use complex AI system that determines distance between them and ball, and them and goal to pass or shoot accordingly. Also, they can be allotted teams , and that would determine which side they pass and shoot. Once they are off the radius of the ball, they do back to their designated spots and wait for ball to come to them.
The ball on being kicked records the player details like his team. Once the ball enters goal, the goal blueprint accesses the ball and retrieves the player information to allot the score to the respective team.