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)