Ok, so what you are saying is that AI, that are spawned on level start, will have a possess->beginplay call order. AI spawned after that will have that order reverse because the game is currently playing. That’s fine. But does the level blueprint’s beginplay get called before or after game is “running”. Because if I spawn AI off the level blueprint’s beginplay event, I get possess->beginplay order, which is the opposite of what you are saying should happen.
Also, how is EventRecieveActivationAI supposed to work then? If you spawn AI after the game is running, you will get EventRecieveActivationAI->Possess. EventRecieveActivationAI has a controller and pawn output, which that pawn output is useless in most cases according to the initialization order currently in there.
Lastly, the perception system has me scratching my head. There are a couple of weird things. First, I would assume the perception component should live on the controller. The controller is where the BT, Services, Nodes, BB all live.
But when the component gets registered with its actor. It gathers stimuli sources that are in the perception system via GenerateQueriesForListener. If the comp is on the controller, then it will not have a GenericTeamId if the pawn is what implements that interface.
Why have the GenericTeamId on the Pawn? You might ask. Well, pawns are the only actors that are auto registered as stimuli sources by the perception system. So they need to know their team ids.
To add to the confusion, the GenericTeamId was written in a way, that it could be put on any actor (a very good thing), but the perception system clearly wants it done specific ways depending on what code path its currently running.
The reason for the long post, is that I keep having to move the team id from the controller to the pawn, now probably back to the controller. I keep telling our guys that our basic AI duder is ready, then he is not, then he is. And if I keep having to make these team Id changes. I got to get our weapon guys to redo some takedamage type work so the weapons damage the right factions
So, if we are using the perception system. what is the right way to handle the team id situation? Why does there seem to be weird edge cases with level begin play with spawning and possession?