Team AI grouping?

I’ve recently finished my basic character pawn that can shoot, aim, reload, switch weapons, etc- all the basic FPS actions. I then duplicated that pawn and created an AI controller/tree/environment query, and set it up so that the AI controller could use a copy of the character pawn and move to/shoot other players in the map- all good so far! However, in order for the bot to find the target he is shooting, it must be an explicit actor in the EQS, so for example the bot targets any “MainPlayerCharacter” blueprints that are active on the map. This is great, but if I want to add another actor to be targeted alongside the MainPlayer, I must create another EQS node on the behaviour tree, and he will target more than one blueprint actor at once based on how close the nearest one is. However, what if the game mode changed to FreeForAll, and multiple copies of the bot were placed in the map, or if I wanted to change the targeted actor on the fly at the start of the game? Is there a way to group blueprints so that the target for the bot is initialised at the start of each game, and can be changed on the fly? (tags seems to be an option, but how do I reference the tagged actors to target?) Also, if each character had a TeamVar- (0- hostile to all, 1- blue team, 2-red team), that could work, but then how could I tell the bot to be hostile to all, or only to shoot the red team?)

I would eventually like to be able to switch the team of a bot / player mid game if an event occurred (example: the player was killed by an enemy, so he moves to the enemy team, which builds up until the other team is eliminated)

Ideally you would use EQS to process AI’s list of all enemies and pick the best one in current circumstances. And have that EQS query run on a regular basis. All (I guess) you’re missing is a “enemy generator” for your EQS query, and you probably could use game-specific tests, but we don’t supply a way to define those in BP yet.

Regarding team, we do have a concept of “generic team ID” in the AIModule, but it’s not hooked-up full just yet.

Cheers,

–mieszko

Awesome, thanks for the information! Good to hear those features are in the works, I might hold off working on the AI for now and go back to it in the future- I know there are some other cool perception nodes coming in the future too. Love the EQS system by the way- very cool stuff!

can you please ellaborate

Ive also had trouble here, I am currently using an int within my pawns to define team ID, but if there is a faster / better incorporated way to better use EQS and perception I would love to know…