there are a number of ways you could go about doing it.

each soldier could have a local pointer called "victim" or something, which would point to their target ("target" is already taken by the engine). also, have each entity set their .skill[0] (or a different skill if you're already using .skill[0]) to what number team they are on (1 or 2). when one soldier sees someone, it could set its "you" pointer to them. then say Code:
if(you.skill[0]!=my.skill[0]) // to check if they are on a different team
victim = you; // braces aren't needed in IF statements if you only have one command

make each soldier shoot at whoever their "victim" is. you could easily put in some conditions to make sure "victim" is always the closest enemy or the one posing the greatest threat. that should get u started! i have to go study now.

hope this helps!

julz


Formerly known as JulzMighty.
I made KarBOOM!