Attach a controller to a spawned AI

I have been roaming the forums for answers. I know you choose Spawn Actor from Class, set your enemy to spawn, it’s respective BT, then you spawn the default controller. Well, this doesn’t work.

Then I found elsewhere that you need to tick Run physics with no controller, and set movement mode to falling in begin play in your Enemy, however, that still doesn’t work.

I have also tried spawnActor, then spawn the controller, then possess, but, once again, it doesn’t work.

Am I doing something wrong? Can anyone lead me to the right path? Many thanks in advance.

Sorry, i was a bit confuse with things you said, you want to spawn an AI enemy (you wont control it) or a character to you control?

You probably want to use “Spawn AI From Class”, choose the behaviour tree in the node settings and -> spawn default controller

If you are talking about compnents of AI, try this youtube series: Creating AI in UE4 Part 1 - AI Components - YouTube

I got to the answer through running a custom event in my game mode which I called in my BT. Apparently its not possible to spawn AI inside a BT, if it is I didn’t found the solution. Thanks to everyone who replied! :smiley: