I ran all my AI tests by “Placing in World” the actor and they work just fine. I also did some tests with spawning them in from an “Event Begin Play” node, and they still work just fine. Through a lot of trial and error I’ve found that (in my GameMode) if put a Delay node on the Begin Play and spawn them, they will work as long as the Delay isn’t greater than .5s.
If they are spawned after the first half second, then they just stand there and don’t move. When I look at the behavior tree while in game, it looks perfectly fine. I ran a test with one immediately spawned enemy and one spawned on a 2 second delay. The first worked fine and the second just stands still. The picture below is what the Behavior Tree looks like (for the broken AI). Nothing was failing, and the BT for the working AI is absolutely identical except for the value of “SelfActor”
Another odd thing I’ve found that can (potentially) fix the issue is getting rid of the intro animation pictured below. If I remove the Branch in the BeginPlay node and just go straight from the Set Variable → 0.1s Delay → AIBeginPlaying, then they all seem to work just fine. FYI the Intro Timeline is exactly 1s long.
What the heck is going on here?!? There shouldn’t be any changes in the GameMode or GameInstance around the .5 second mark, so why do they stop working if they’re spawned after that? Also, why does the Behavior Tree still appear to be working just fine when it most certainly is not?
Even if you don’t have an answer, let me know if you know of any more tests I can run to help figure this out.