In case anyone else ever needs to do this, I found a way how.
Just set the bot's hType (team) to Neutral, then add the following code to the bot's loop:
function ExampleHoleBot::onBotLoop(%this, %obj)
{
//hReturnCloseBlockhead code, with a couple of tweaks.
%type = $TypeMasks::PlayerObjectType;
%pos = %obj.getPosition();
%scale = getWord(%obj.getScale(),0);
%radius = brickToRadius( %obj.hSearchRadius )*%scale;
initContainerRadiusSearch(%pos,%radius,%type);
while((%target = containerSearchNext()) != 0)
{
%target = %target.getID();
// take into consideration LOS
if( %target != %obj && !%target.isCloaked && hLOSCheck( %obj, %target ) )
{
if(%target.hType $= "TeamToAttack") //Check the target's team to make sure it's the specific team that needs to be attacked. Not put into the above line for readability.
{
// remember to check FOV before continuing
if( %obj.hSearchFOV )
{
if( %obj.hFOVCheck( %target ) )
{
%obj.hFollowPlayer( %target, 1, 0 ); //Makes the bot attack the target if it's team matches.
}
}
}
}
else
{
if(%target.hType $= "TeamToAttack")
{
%obj.hFollowPlayer( %target, 1, 0 );
}
}
}
}
Thanks to both of you for the help.